This is the code for loading:
Loading a level
Load Dir$+_PROJECTNAME$+"/"+_DEFAULTLEVELS$(_LEVELINDEX),16
For C=Start(16) to Start(16)-Length(16)-2 Step 2
Doke C, Deek(C) xor $A55A
Ror.w 5,C
Next C
For HEIGHT=0 To 49
For WIDTH=0 to 49
OFFSET=Leek(HEIGHT*49+WIDTH)*4+Start(16)
LEVELGETCARD$(WIDTH,HEIGHT)=Peek$(12001+Start(16)+OFFSET, 32768,Chr$(0))
LEVEL(WIDTH,HEIGHT)=Peek(Start(16)+9604+(49*HEIGHT+WIDTH))
Next WIDTH
Next HEIGHT
Erase 16
Saving a level
For N=0 to _NUMOFLEVELS-1
_DEFAULTLEVELS$(N)="level"+str$(N)
_DEFAULTLEVELSPROPERTIES$(N)="level"+str$(N)+" Properties"
STRINGLENGTH=0
For HEIGHT=0 TO 49
For WIDTH=0 TO 49
LEVELGETCARD$(WIDTH,HEIGHT)=LEVELGETCARD$(WIDTH.HEIGHT)+Chr$(0)
STRINGLENGTH=STRINGLENGTH+Len(LEVELGETCARD$(WIDTH,HEIGHT))
Next WIDTH
Next Height
Reserve As Work 16, (STRINGLENGTH+12001+3) and Not 3
OFFSET=12001
For HEIGHT=0 TO 49
For WIDTH=0 TO 49
Poke$(Start(16)+OFFSET),(LEVELGETCARD$(WIDTH,HEIGHT))
Loke Start(16)+(49+HEIGHT+WIDTH)*4, OFFSET
OFFSET=OFFSET+Len(LEVELGETCARD$(WIDTH,HEIGHT))
Poke Start(16)+(49*HEIGHT+WIDTH)+9604, LEVEL(WIDTH,HEIGHT)
Next WIDTH
Next Height
For C=Start(16) To Start(16)+Length(16)-2 Step 2
Rol.w 5,C
Doke C,Peek(C) xor $A55A
Next C
Save Dir$+_PROJECTNAME$+"/"+_DEFAULTLEVELS$(N)
Erase 16
Next N