I came across this BlitzBasic code which does a similar decrunching routine
AppTitle "Decrunch"
; Version 1.0
; April 2001
; Made by Einar Wedøe
; Programtype: Blast from the past :-)
; Does nothing at all but simulate a decrunch routine from the C64 days !
Graphics 640,480,16,1
Global font1
font1=LoadFont ("verdana",20,False,False,False) ; Sett up font
SetFont font1
SetBuffer BackBuffer() ; Start with the backbuffer()
Global frametimer=CreateTimer(75) ; Set up timer to make everything run nice on all PC's
;---------------------------
.start ; Mainloop
While Not KeyHit(1) ; Loop until ESC is pressed
WaitTimer(frametimer) ; Wait....
Cls ; Clean up
flash ; Do the flash
Color 255,255,255 ; Set color to white for the text
Text 240,235,"Decrunching..." ; Set dumy-text
Flip ; Change buffer
Wend ; Next round please
End ; Tha's it !
;---------------------------
Function flash() ; Flashroutine
a=0 ; Reset counter
.flashloop
Color Rand(255),Rand(255),Rand(255) ; Set color randomly
tmp=Rand(10) ; Set size of next line random
Rect 0,a,640,tmp ; Draw the rect (the next flashline)
a=a+tmp ; Increase counter with height of the rect
If a > 480 Then Goto endflash ; Are we at the bottom yet ?
Goto flashloop ; If not make another rectangle
.endflash
End Function ; Thats it for this frame
;----------------------------http://www.blitzbasic.no/decrunch.html