Of course I wanted to give it a shot on the ZX81, you can find my attempt here:
TV noise ZX81 by Noice
Here's the code for the effect itself, 34 bytes:
Code: Select all
; TV-noise for the ZX81
; by Andreas 'Shadow/Noice' Gustafsson
; 2010-11-13
ld hl,(400ch)
ld de,24*33
add hl,de
ld de,7618h ; d=halt opcode, e=y loop counter
ld (hl),d ; Ending halt
yloop:
ld b,32
xloop:
dec hl
and 63 ; Make sure we have a legal char
ld (hl),a
inc a
djnz xloop
add a,e ; Add y to char to get more 'randomness'
dec hl
ld (hl),d
dec e
jr nz,yloop
infloop:
and 15 ; Stick with lowest 4k of ROM so we don't get the real charset, just random data
inc a
ld i,a
jp infloop
I'd like to know how to strip it down to the bare minimum. What is the smallest size that you can get the code above up and running on a ZX81?