A couple of modifications to my little routine so you can control it from the console:

deactivate = true to stop it
speed = 8 to change the speed
speed = 184 looks kind of ghostly with each frame alternating out of phase


Code
deactivate = false
speed = 4
framecount = 0

function tms_frame_call()

if not deactivate then
framecount = framecount + speed
sinoffset = math.floor(math.sin((framecount % 360)/360*(2*math.pi))*20);
for i=0,string.len(a)-1 do
 setsprite(i,math.floor(50+(i%4)*20+sinoffset),30+math.floor(i/4)*20,string.byte(a,i+1),(i*2+1)%16);
end
end
end

emu.register_frame(tms_frame_call)