Log In  
Follow
rilden

Cart #rld_conway-2 | 2021-09-16 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
13


With the release of pico 0.2.3 the code slowed down a bit and exceeded 100% cpu, so I lowered the maximum fps from 420 to 390.

Controls: change color with left and right, change speed with up and down.
You can change the initial board by changing the spritesheet. Use colors 0 and 7.

The board is stored as a bitmap, 1 bit per cell at address 0x4300.

Updating the board:
32 cells are processed in parallel using bitwise operations.
The bits are added together using the following functions:

  function add2(a, b)
    sum = a ^^ b
    carry = a & b
    return sum, carry
  end

  function add3(a, b, c)
    tmp = a ^^ b
    sum = tmp ^^ c

[ [size=16][color=#ffaabb] [ Continue Reading.. ] [/color][/size] ](/bbs/?pid=94115#p)
13
5 comments