Elena - LoRes Demos

I've been adding some support to the Elena standard library for the LoRes screen mode of the ZX Spectrum Next, as well as some code for creating palettes and floating point number support. I've created two demos that use the new code:

Stripes

Displays some stripes. 'nuff said. The demo is a little flickery because I haven't tried to sync with the vertical blank, just drawn the stripes on the screen. Obviously there are much better/more efficient ways to create this effect!

Download it here.

Gravity

This one is a bit more interesting. It simulates a number of particles attracted to each other by gravity. The code using floating point maths to calculate gravity, which is rather slow, so more that 6 or so particles on the screen and the frame rate starts to drop quite a lot. Of course it could be optimised; using lower precision floating point code would speed things up a lot without making much difference to the paths of the particles.

Download it here. Pressing any key in the demo will reset the particles to random positions. Pressing a number key from 1 -> 0 will change the number of particles from 1 -> 10. I'll warn you now that 1 is a little dull.