SA-1 Murmuration Demo — 128 neon moths in Lissajous sine patterns.
The SA-1 computes 128 positions using overlapping Lissajous sine patterns at 10.74 MHz. The main CPU reads them from I-RAM and displays them as a cloud of neon moths over the city's far skyline in the rain.
Each bird's position is the sum of two sine harmonics per axis, with prime-number phase multipliers creating organic flock spread: X = sin[bird*3 + frame]/2 + sin[bird*7 + frame*2]/4 + 32 Y = sin[bird*5 + frame+64]/2 + sin[bird*11 + frame*3]/4 + 16
- SNES Concepts
- The SA-1 computes while the main CPU displays: positions written to shared I-RAM, read by the 65816 each frame
- A sync byte in I-RAM as the handshake between the two CPUs
- One tiny sprite (a 4x3 moth in an 8x8 tile) for all 128: the cloud bunches up, and a line shows at most 32 sprites
- oamMemory[] written directly, the escape hatch beside oamSet(): 128 positions copied from I-RAM each frame in one loop
- What to Observe
- 128 moths moving in smooth, coordinated flock-like patterns over the skyline
- The pattern resembles a murmuration (starling flock)
- All math computed by SA-1 coprocessor at 10.74 MHz
- Modules Used
- console, sprite, dma, background, input, sa1