SetPaletteFire:
  mov dx,3c8h
  mov al,0
  out dx,al
  inc dx
  out dx,al
  out dx,al
  out dx,al

  mov cx,63
  .spt2:
    mov al,63
    sub al,cl
    out dx,al
    shr al,1
    out dx,al
    mov al,0
    out dx,al
  loop .spt2
ret


SetPaletteTunnel:
  mov dx,3c8h
  mov al,0
  out dx,al
  inc dx
  out dx,al
  out dx,al
  out dx,al

  mov cx,63
  .spt1:
    mov al,63
    sub al,cl
    shr al,1
    out dx,al
    out dx,al
    mov al,63
    sub al,cl
    out dx,al
  loop .spt1

  dec dx
  mov al,255
  out dx,al
  inc dx
  out dx,al
  out dx,al
  out dx,al
ret

SetPaletteParticle:
  mov dx,3c8h
  mov al,1
  out dx,al
  mov cx,255
  mov bl,0
  inc dx
  .spp_1:
    mov al,bl
    shr al,3
;    add al,16
    out dx,al
    out dx,al
    mov al,bl
    shr al,3
    mov ah,bl
    shr ah,4
    add al,ah
    add al,16
    out dx,al
    inc bl
  loop .spp_1
ret
