DECLARE SUB DUMPdata () DECLARE SUB BENCHMARK () DECLARE SUB VRT () DECLARE SUB PREloaddata () DEF SEG = &HA000 DIM SHARED precache&(160, 100), endNPOKE#, startNPOKE SCREEN 13 PREloaddata startNPOKE# = TIMER CLS FOR col% = 0 TO 15 VRT FOR x% = 1 TO 159 FOR y% = 1 TO 99 POKE precache&(x%, y%), col% NEXT y% NEXT x% NEXT col% endNPOKE# = TIMER SCREEN 0: WIDTH 80 PRINT 16 / (endNPOKE# - startNPOKE#); " FPS with New Routine " PRINT "Time taken with New Routine:"; endNPOKE# - startNPOKE# SUB PREloaddata FOR x = 80 TO 240 FOR y = 50 TO 150 precache&(x - 80, y - 50) = ((320 * y + x)) NEXT y NEXT x END SUB SUB VRT ' Waits for Vertical Retrace. Slows us down, But Hey it gets rid of white ' "Static" and Un-Needed Flicker. If we are rushed for speed then we ' remark this line OUT. For benchmark stake We will keep it in. WAIT &H3DA, 8: WAIT &H3DA, 8, 8 END SUB