#include "wgt.h" #include "include/mem.h" // ######## REQUIRED FUNCTIONS ######## unsigned long state0 = 1000; unsigned long state1 = 2000; unsigned long rand(void) { unsigned long s1 = state0; unsigned long s0 = state1; state0 = s0; s1 ^= s1 << 23; s1 ^= s1 >> 17; s1 ^= s0; s1 ^= s0 >> 26; state1 = s1; return state0 + state1; } void wait_msec(unsigned int n) { register unsigned long f, t, r; // Get the current counter frequency asm volatile ("mrs %0, cntfrq_el0" : "=r"(f)); // Read the current counter asm volatile ("mrs %0, cntpct_el0" : "=r"(t)); // Calculate expire value for counter t+=((f/1000)*n)/1000; do{asm volatile ("mrs %0, cntpct_el0" : "=r"(r));}while(r 100) b = 100; if (b < 0) b = 0; if (c > 197) c = 197; if (c < 100) c = 100; top[t] = b; /* Create random wavy lines */ bot[t] = c; } wwarp (0, 319, top, bot, wgt1, 0); /* And warp image between them */ getch (); /* Wait for keypress */ wcls (vgapal[0]); /* Clear screen with black */ } while (1); /* End program if Q pressed */ wfreeblock (wgt1); /* Free memory from image */ } void main() { wgt32(); while (1); }