Grayscale on playdate

I understand that Playdate has a 1-bit display, and also that there are options for dithering grayscale images. I was just remembering the old days of TI-86 assembly hacking, and how some developers figured out a way to get grayscale images out of the supposedly 1-bit screen by flickering the pixels on- and off very quickly (at least, that’s how I understood it to work at the time). The effect was fairly convincing. Wondering if such a thing would be technically possible on the Playdate, given the differences in display technology?

1 Like

Hello. Grayscale on calculators are a relatively popular feature in those circles but works mostly because the time a pixel takes to switch from being fully black to fully white (or vice versa) is quite longer than what it looks like on a PlayDate; making it blink at a proper pace, you end up getting a pixel generally in a (relatively) stable intermediate position.

When I did the sphere sketch, I had worries it'd be unreadable because that latency would smudge everything into a blurry gray-on-black sludge. I was shown a few video captures of PlayDates playing and I found the result pretty clear. No visible blur on the videos. So I think it might be pretty hard to get to something as stable without having strong blinking issues.

It's possible, but it requires sidestepping the SDK in a few ways, and comes with lots of caveats.

See my old post with demo .pdx here: Matt's Prototypes - #87 by matt

I'm currently writing up this technique which will be released with source code.

@matt cool, thanks! I don't have a device yet so I can't test the effect, but I'm looking forward to trying it out (I'm in Group 2).

1 Like

Sharp Memory Display is so good it needs 60Hz to work at all, 120Hz to work well, 200Hz it's very convincing. But...

I stand corrected, my bad. I was wondering if there was anything in the device interface to quickly swap between buffers (for features like pseudo-vsync) you could use to accelerate this kind of process, or having it in an interrupt-handling routine?

Edit : realizing that the post's wording might be confusing, I'm just asking about the design of the hardware, not trying to armchair-program the feature, sorry. I should look on the hardware documentation.

I would also like this, and make it handled automatically by the render method

ie: the images in 2 bit format would allow for black, white, transparent, and grey/translucent

You call render, and it renders 2 frames. One with grey being not-visible, and the other with it visible

The problems are:

  • it requires a higher refresh rate than the SDK supports

If you get around that, it means

  • only part of the screen can be updated (roughly half, but it's more complicated than that)

Did you try my demo @NeoTechni ?

I ordered a PD yesterday, needless to say I won't be getting one till next year

So not yet.

1 Like