Lots of travelling lately and for me, time in airports and long train journeys are time for acts of random research. One of the recent fruits is a new imaginary processor (code name Jellyfish), largely based on Betablocker DS but with ideas stolen from the PS2 vector unit.
Like the PS2 VU it’s a vector processor, but each instruction is 96 bits wide (unlike the PS2 which is 128), enough to store 3 32bit values representing 3D vectors or colours. Like other Betablocker variants every combination of bytes are valid as a runnable program, so it will for example happily execute random junk.
There are currently 25 instructions, with vector operations like dot, cross product and length, and various instructions for reordering vectors. It’s targeted at running on ARM processors so it uses fixed point maths for battery friendliness.
This is an ascii-shot of the super exciting debugger running a similarly exciting program to rotate a vector around the z axis.
-- prog -- pc:11 004 sta 13.000000 0.000000 005 sin 0.000000 0.000000 006 sta 14.000000 0.000000 007 lda 14.000000 0.000000 008 lda 15.000000 0.000000 009 crs 0.000000 0.000000 010 sta 16.000000 0.000000 011 > jmp 0.000000 0.000000 012 0.000000 0.000000 0.000000 013 60.000000 0.000000 0.000000 014 -0.125977 -0.992020 0.000000 015 0.000000 1.000000 0.000000 016 0.000000 0.000000 -0.125977 017 0.000000 0.000000 0.000000 -- stk -- stk:0 0.000000 0.000000 0.000000 : 199 0.000000 0.000000 0.000000 : 200 > 0.000000 0.000000 -0.125977 : 201 0.000000 1.000000 0.000000 : 202
One thought on “Jellyfish”