Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Nokia hardware learnings

A topic by hoaniware created 18 days ago Views: 101 Replies: 4
Viewing posts 1 to 5
Submitted(+1)

Hey everyone, I've spent the last few weekends cooking up an engine which can export to both a nokia phone driven by a raspberry pi pico and to web/desktop - I won't share the engine yet because it's a mess, but I have learned a lot about the hardware.


This is the Nokia 3315's PCB next to a custom board I made to drive the buzzer, screen, vibrator, leds and keypad. Photo was taken last night as I was assembling it.

A few things I'd like to share:

Screen Update Rate and Response Times

The screen does indeed update at up to 67Hz, but there is a caveat - the response time is quite slow. 

  • Pixel Empty->Fill: ~50ms
  • Pixel Fill->Empty ~125ms

You can see it here:

The image should be a sphere, but it is moving from left to right and we have ghosting behind the sphere. This dies out at around 125ms, so for a 60Hz framerate that would be like 10 frames or so? I don't know the best model for this, linear or exponential, but I suspect either will look good.
There's actually a more subtle response time issue on the leading edge, to apply a black pixel has a response time of around 50ms (~3 frames), you can see this near the right edge of the screen where the pixels where the sphere is being rendered are still forming.

Screen Flashing

If you are like me, you may see the response time on the screen as an opportunity, like "hey if I flash pixels on and off really fast, I will get in-between shades!"

Yes... but it's terrible!

I experimented with this with the following procedure:

  • Draw a square on the top left corner, always empty
  • Draw a square on the top right corner, always filled
  • All other pixels flash every second frame

The result looks like a mess:

There are clear darker zones beneath the two rectangles, but the faded effect across the LCD is uneven as well... so yes you can get in-between shades, but they will not look even or uniform at all.

Screen Pixel Dimentions

The dimensions of the LCD module for the PCD8544 is roughly 30.5 by 21.5mm. Dividing by the number of pixels 84 by 48, we get a single pixels dimension of 0.363 by 0.448. 0.448/0.363 =1.23, so I'd give this a ratio of about 4 by 5 (5/4=1.25) if emulating the pixel's dimension - those rectangles in the "flashing" image above are actually squares, so you can see how impactful this pixel ratio is.

Screen Colors
There are technically 3 colors on a screen, the color outside the draw area, the empty color on the draw area, which is slightly darker, and then the fill color. 

Lines between Pixels
You may notice little light lines between the pixels in the above images, these are super thin, but interestingly they are same color as outside the draw area. If you are looking to imitate this in your game, I'd recommend doing some color mixing to give their "impression" rather than color the lines as the outer draw area. This is because they are so thin, you'd need a super high resolution monitor to justify making them the color they are on a real screen. 

Screen Color Palette
As far as I can tell, the different color palettes (green, blue, white) actually come from backlights that Nokia have fit on these screens. Technically, this could mean if you hand modify your 3310 (which isn't actually that hard if you are good with a soldering iron) you could have any color tint you want, red, purple, orange, whatever.

Buzzer

The sound packs in the jam resources are based around the Nokia 3310 buzzer, I've been able to drive this buzzer with a square wave input and the notes reproduce the sound faithfully. I think the jam's guidance on this is correct.

Keypad

The Nokia keypad is a typical matrix style keypad where there a little pressure pads which make contact with a metal diaphragm.  Several keys will share a single output pin but then share their inputs with other keys. Interestingly the spread of the rows and columns are not what you'd expect, for example a shared pin input does not span any given physical row or column.

Vibe (Shake)

It's kind of obvious when you think about it, but the 3310/3315 has a vibration unit in it - I couldn't find any good references for this in games, and the 3315 I have at home had no battery so I couldn't check myself, but this manual https://nokia-3310.helpdoc.net/en/12-games-menu-8/using-the-game-options/ more or less demonstrates that the "shakes" option was available for games.

If you have any questions - please feel free to ask, it's been fun learning about the hardware in the last few weeks.

Host(+1)

This is some really great information! I appreciate you sharing your findings with everyone!

Submitted

I was curious about the frequency range on the phone. Turns out, it's very wide, but distorts a lot.  

Good luck with the jam tomorrow everyone. Looking forward to it!
Submitted(+1)

Great research. Now I'm wondering how I can incorporate this into my framework to make the screen behave more realistic. :-D

Submitted

thats really good man, keep it up!