The built-in SmileBasic Background system works exactly how you describe.
You've got:
BGLOAD Layer, [Start point X,Start point Y,Width,Height,] Numerical value arrayWhere your tiles are the actual value of the sprite def.
Variable=BGGET( Layer, X, Y) IF Variable==theSPDEFofWalls THEN there is a wall at X,Y ELSEIF Variable!=0 THEN GOTO action$[Variable] ENDIF ... MORE CHECKS...EDIT: just use an array if it's not display data.
TILE = map[nextX][nextY] If TILE==1 THEN 'WALL nextX=curX nextY=curY ELSEIF TILE>1 THEN GOTO warps$[TILE] ENDIFEDIT 2: As far as scrolling goes, you just maintain a BGOFS. The grid position has nothing to do with the pixel offset. To load that map:
DIM map[9,9] COPY map,"@SRC" @SRC DATA 1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,2,1,1