1

Topic: Nokia N900?

I see that there is plenty of interest in a possible iPhone, but have you guys considered (or are aware of) the upcoming Nokia N900 phone?

It is pretty much an open and familiar platform running the latest version of the Debian-based Maemo distribution (earlier versions of which run their previous Internet Tablets - N770, N800 & N810). The platform is much more open and accessible than Andriod and WebOS, which means no worrying about approval or special conditions to be able to publish apps and no having to 'hack' or 'jailbreak' the phone to run the software you want it to run.
It has all the features of the iPhone - same processor, more memory, touch screen (higer res), accelerometers and OpenGL-ES. SDL has already been ported to the Maemo platform.

I would look at doing the port myself as I think the game is a perfect fit for the device, but I know squat about OpenGL (never mind ES). Is anyone else thinking that this would be a good target platform - especially with Maemo being much more community oriented than the iPhone?

2

Re: Nokia N900?

I second this and porting to an open linux system should prove to be much easier smile

3

Re: Nokia N900?

HAD to register, this thread merits support! smile
I really hope it'll come to Maemo/MeeGo somewhen soon! Would be awesome! smile

4

Re: Nokia N900?

Yes, I have seen pics of the N900, and it is a worthy system. Search the forum and send an email to the two iPhone port developers.

Currently Playing:
Celeste and Electronic Super Joy

5

Re: Nokia N900?

Well since it already was ported for linux the only complicated part remains openglES...
http://www.happypenguin.org/show?Neverball

6

Re: Nokia N900?

You will have to wait until I have completed the Pandora Port.  Seeing as the Pandora isn't out quite yet, I guess this will be in the summer.  The OpenGLES part has been done in the iPhone work I did, but I want to get the updates into the latest Neverball version.

7

Re: Nokia N900?

You go Lazrhog!

Also, I was wondering...

...are you really a HOG with frickin' LAZERs attached  wink

Currently Playing:
Celeste and Electronic Super Joy

8

Re: Nokia N900?

themacmeister wrote:

You go Lazrhog!

Also, I was wondering...

...are you really a HOG with frickin' LAZERs attached  wink

Yes indeeedy smile

9

Re: Nokia N900?

I spent countless hours on Neverball.

It would be great to have it also on my Nokia N900.

Nokia N900 is a Linux computer sporting a Cortex-A8 processor, 256Mb RAM, accelerated OpenGLES, accelerometers (way better than a mouse!) and lots of other bells and whistles.

Are there any people working on the N900 port?

10

Re: Nokia N900?

alfmar wrote:

I spent countless hours on Neverball.

It would be great to have it also on my Nokia N900.

Nokia N900 is a Linux computer sporting a Cortex-A8 processor, 256Mb RAM, accelerated OpenGLES, accelerometers (way better than a mouse!) and lots of other bells and whistles.

Are there any people working on the N900 port?


Apparently the N900 and the Pandora (www.openpandora.org) use exactly the same processors, and the same GLES chips, and the same OS, so I am fairly sure that the port I do for Pandora will work straight away on the N900 .....

11

Re: Nokia N900?

Lazrhog wrote:

Apparently the N900 and the Pandora (www.openpandora.org) use exactly the same processors, and the same GLES chips, and the same OS, so I am fairly sure that the port I do for Pandora will work straight away on the N900 .....

I'm very excited and waiting for the port to get completed. But one curiosity, you will put the source code public, right? Till then me goes to find a way to emulate the computer mouse using the N900, playing with an accelerometer would be just soo fun smile

12

Re: Nokia N900?

shaan7 wrote:
Lazrhog wrote:

Apparently the N900 and the Pandora (www.openpandora.org) use exactly the same processors, and the same GLES chips, and the same OS, so I am fairly sure that the port I do for Pandora will work straight away on the N900 .....

I'm very excited and waiting for the port to get completed. But one curiosity, you will put the source code public, right? Till then me goes to find a way to emulate the computer mouse using the N900, playing with an accelerometer would be just soo fun smile


By the time I get my Pandora (I am in the queue but near the end), hopefully another port of Neverball (by rlk for the iPad) will be in the wild, and the source code can then be freely released.  The good thing is that the port for Pandora will go back to using SDL, so the only changes to the 1.5.x Neverball will be the conversion to OpenGLES.

13

Re: Nokia N900?

Neat, looking forward to it.

14

Re: Nokia N900?

parasti wrote:

Neat, looking forward to it.


I'll be posting a video of Neverputt on the iPad later, so keep a look out for it.  It is stunning smile

15

Re: Nokia N900?

I don't know about the N900, but I have seen a very interesting Xoom review the other day and it's is all I can think about ever since. It seemed quite reliable and easy to use and I might get one, I'll decide if it's worth keeping it or not after using it for a while though.

16

Re: Nokia N900?

Hi!
  I'm trying to get neverball running on the Nokia N900. So far, I got it to compile but when I run it all I get is a black screen. After a couple of seconds since I start the application, I see these messages flooding the terminal:

SGX Out of mem event
SGX Out of mem event
SGX Out of mem event
SGX Out of mem event
SGX Out of mem event
...

When I print the GL parameters from share/glext.c I get:
Max texture size: 2048
Max texture units: 4
Are these values OK (I'm a total newbie as far as GL is concerned). What configuration parameters should I try to change to decrease the GPU memory need? Or what changes to the code?

17 (edited by parasti 2011-06-30 20:19:12)

Re: Nokia N900?

The textures option in neverballrc controls the texture downscale factor. Setting that to 2 and higher powers of 2 should reduce texture memory usage.

Might be a good idea to scatter glGetError checks in the code to pinpoint problems.

To load a different level at launch, use ./neverball --level <level.sol>. Testing different levels might also provide some clues.

18

Re: Nokia N900?

Got it working! :-)

The memory error was happening because the libSDL shipped with the N900 was compiled without GL support, so I had to hack the code a bit to use this library to setup the GL context. And it requires calling its SDL_GLES_SwapBuffers(); calling SDL_GL_SwapBuffers() doesn't work, and on the contrary confuses the GL driver.

There are still a few things that don't work as they should: for some reason, after exiting a level (either because you lose or because you finish it) the fullscreen mode is left, and we are back to windowed mode. But then, when you start the next level, fullscreen mode is restored again. I don't understand where this happens... the only place which deals with the video mode is the video_mode() function in share/video.c, but that function is not called. What else could it be?

The other problem is the performance: I get slightly more than 20 fps for the simplest levels, but some more complex levels are just stuck. The first one in "Retour de force" for instance shows 15 FPS before the game starts, but drops at 0 (and is completely stuck) as soon as the "GO!" is issued. I'll try to profile that.

19

Re: Nokia N900?

mardy wrote:

There are still a few things that don't work as they should: for some reason, after exiting a level (either because you lose or because you finish it) the fullscreen mode is left, and we are back to windowed mode. But then, when you start the next level, fullscreen mode is restored again. I don't understand where this happens... the only place which deals with the video mode is the video_mode() function in share/video.c, but that function is not called. What else could it be?

It turns out to be the mouse grab/ungrab. Since we'll always run in fullscreen mode in the N900, I'll just disable that code.

20

Re: Nokia N900?

Here's the output of the profiler:

Nokia-N900:~# opreport -l /opt/neverball/bin/neverball 
warning: /no-vmlinux could not be found.
CPU: OMAP GPTIMER, speed 0 MHz (estimated)
Counted GPTIMER_CYCLES events (32KiHz timer clock cycles between interrupts) 
with a unit mask of 0x00 (No unit mask) count 16
samples  %        image name               symbol name
11317    31.7947  neverball                sol_test_node
5813     16.3314  neverball                v_sol
5751     16.1572  libvorbis.so.0.4.3       /usr/lib/libvorbis.so.0.4.3
5641     15.8482  libGLES_CM.so            /usr/lib/libGLES_CM.so
1146      3.2196  libvorbisfile.so.3.3.2   /usr/lib/libvorbisfile.so.3.3.2
1146      3.2196  no-vmlinux               /no-vmlinux
852       2.3937  neverball                voice_step
599       1.6829  libm-2.5.so              floor
263       0.7389  libm-2.5.so              __kernel_cosf
235       0.6602  neverball                sol_back
212       0.5956  libm-2.5.so              __kernel_sinf
204       0.5731  libc-2.5.so              memset
187       0.5254  libm-2.5.so              __ieee754_rem_pio2f
168       0.4720  libc-2.5.so              memcpy
155       0.4355  libogg.so.0.5.3          /usr/lib/libogg.so.0.5.3
146       0.4102  libsrv_um.so             /usr/lib/libsrv_um.so
136       0.3821  libm-2.5.so              __kernel_rem_pio2f
131       0.3680  libm-2.5.so              cosf

I tried to debug it a little, and I've seen that the game_step() function is invoked regularly with dt = 0.011, but the graphics don't update. Any hints on what's going wrong here? Is the physics calculation taking too long?

21

Re: Nokia N900?

mardy wrote:

I tried to debug it a little, and I've seen that the game_step() function is invoked regularly with dt = 0.011, but the graphics don't update. Any hints on what's going wrong here? Is the physics calculation taking too long?

Yes, that's most likely the problem. This is the so-called "spiral of death" that can happen when using a fixed timestep scheme while being CPU bound. It means that the real time to run a simulation of X seconds actually takes longer than X seconds, forcing the game to do more simulation steps every frame and effectively lock up.

The easiest thing to try would be to reduce the number of updates per second. This is the UPS define in ball/game_common.h. E.g., cutting it in half from 90 to 45 would give the CPU twice the time to do the simulation.

22

Re: Nokia N900?

parasti wrote:

The easiest thing to try would be to reduce the number of updates per second. This is the UPS define in ball/game_common.h. E.g., cutting it in half from 90 to 45 would give the CPU twice the time to do the simulation.

Thanks! I decreased it to 30, and now it doesn't get stuck anymore (running at 5-10 FPS). I suppose that it I can safely set it to 30, if I'm sure that the game FPS will never be higher than that?

BTW, I created a project in the maemo.org garage, and pushed my changes there, in case anyone is interested:
https://garage.maemo.org/plugins/ggit/b … /fremantle

I believe there's still much left to do in order to have the game fully playable on a mobile device. I'm going to raise a few points on another thread.

23 (edited by parasti 2011-07-07 12:31:58)

Re: Nokia N900?

mardy wrote:

I decreased it to 30, and now it doesn't get stuck anymore (running at 5-10 FPS). I suppose that it I can safely set it to 30, if I'm sure that the game FPS will never be higher than that?

The UPS value is not tied to FPS. We interpolate the last two states before drawing to screen, so you'll see the same smooth motion no matter how high your FPS is.

What the UPS does affect is simulation stability. A small UPS causes gravity to be applied in large chunks and less frequently. When the UPS is small enough, this results in visible physics artifacts (e.g., ball bouncing for no reason). 30 UPS is borderline acceptable; at that rate the artifacts are just large enough to be noticeable at the beginning of game but not so much during the game.

24

Re: Nokia N900?

16bit colour, lower res textures?

I remember running early OpenGL games (GLQuake etc.) on OLD graphics cards (Voodoo, TNT) and 16bit made a MASSIVE difference in framerate. Also, screen res, but that is not an issue for you.

Mathematics functions need only be enough to draw the resolution available. With a 320x240 screen, you could get by with 8bit maths, but you would probably need 10bit to do 800x600 or similar. Anyways, lessen the maths load, and it should run faster still.

Best of luck!

Currently Playing:
Celeste and Electronic Super Joy

25

Re: Nokia N900?

And here's a video of neverputt on the N900:
http://blog.mardy.it/2011/07/e-neverputt.html
smile