Learning Spectrum Next basic part 4 - Tile map scrolling
#spectrumnext #nexbasic #zxspectrum How I worked out the tile map scrolling on the Next I am replacing greater than and less than with { } because YT does not allow 10 RUN AT 0:layer 2,1:cls:LAYER DIM 16,0,239,191 20 load "1-40.spr" bank 14: tile bank 14 30 LOAD "40tiles.map" BANK 15 40 TILE DIM 15,0,40,16: rem setup the tile map area stored in bank 15 starting at 0 with 40 tiles wide 45 let m=0: let m1=0:rem m = tile taken from the complete map and m1 = tile for the screen 50 for x=0 to 15:tile 1,12 at x,0 to x,0: pause 1:next x : rem this should be tile but I used this fpr the demo 60 rem PAUSE 1 65 let ll=0 : rem loop of 0 } 16 for scroll before drawing new tile 70 FOR l=0 TO 384 :rem loop of length to scroll in pixels 40 x 16 80 IF l } 255 THEN l2=l-256: rem if you scroll past 255 subtract 255 81 if l{256 then l2=l: rem if not use this 82 m= INT (l/16): rem divide the x scroll pixel by 16 83 m1= int(l2/16) : rem device the screen scroll by 16 85 rem PRINT AT 1,1;" l ";l;" ";
βhttps://makertube.net/w/fksbAx9Y5Yh7kdPmhcC98f