Just tried the dice program and it loaded and saved without problems. It did have a syntax error in line 1020 :)
This was using the REX vanilla TSDOS ROM version with an ATMEGA "TPDD Drive", however it was not using SD2TPDD. It was using a heavily modified variant of DLPLUS running on a MEGA platform, it is not an Arduino board. The file was only one directory level down though. File size is 2379 as reported. Also tried the MENU.BA program from the link Brian provided and that saved and loaded fine - although it did need a reset of the machine after it was run. :) I think REX TS-DOS appears to be working OK? From: M100 <[email protected]<mailto:[email protected]>> on behalf of Gary Hammond <[email protected]<mailto:[email protected]>> Reply-To: <[email protected]<mailto:[email protected]>> Date: Tuesday, October 15, 2019 at 1:22 PM To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>> Subject: Re: [M100] Issue with sd2tpdd Observations from the comments to date and other questions: * The first 2 bytes corruption may not affect all files. (Does the file size matter?) * Brian’s testing seems to indicate that the issue isn’t restricted to SD2TPDD. * I tried Dans suggestion of adding the ‘break’ around line 191. It has not solved the trailing null problem. * I have noticed references to DOS100.CO in the comments and on GitHub. Under what circumstances does it need to be there? * How can we check that we are using the same version of TS-DOS? * Is capitalisation of the filename important on the SD card? * Is file size important, i.e., does the final packet of file data sent have to be a particular size or power of 2 or buffer rollover point to trigger this? * Is it possible that there is also a bug in TS-DOS? More details of my configuration: * The file I am using is 2 levels down on the SD card i.e., zzzzzz -> games -> dice2.do * The file is 2379 bytes long. * The M100 has a REX fitted with TS-DOS ROM loaded. The file I have been using follows… 1 '**** Dice Program **** 2 'Dice rolling program for Model 100,102,200 3 'Gary Hammond 2016 4 '[email protected]<mailto:'[email protected]> 10 '*** Initialisation *** 30 DIM DR(5) ' Dice roll 40 PP=41 ' Print Position 50 DT$="*" ' Dice dot symbol 100 '*** Main Program *** 110 GOSUB 200 'Get the number of die to roll 120 GOSUB 1000 'Randomise the random number 130 CLS 140 PRINT@292,"Roll or Quit (R/Q)?"; 150 GOSUB 300 'Wait for roll/quit command 150 IF AN = 1 THEN GOSUB 400 ELSE GOTO 170 'Either roll the dice or quit 160 GOTO 140 170 CLS 180 PRINT"Goodbye!" 199 END 200 '*** Get the number of die to roll *** 210 CLS 220 PRINT@285,"How many die to roll (1-4)"; 230 A$ = INKEY$ 240 IF A$ = "1" OR A$ = "2" OR A$ = "3" OR A$ = "4" THEN 260 250 GOTO 230 260 DN = VAL(A$) 299 RETURN 300 '*** Wait for roll/quit command *** 310 A$ = INKEY$ 320 IF A$ = "" THEN 310 330 IF A$ = "R" OR A$ = "r" OR A$ = " " THEN AN = 1:RETURN 340 IF A$ = "Q" OR A$ = "q" THEN AN = 0:RETURN 350 GOTO 310 399 RETURN 400 '*** Roll the dice **** 410 CLS:PP=41 ' Print position for die 420 FOR RN = 1 TO DN 430 Y = RND(1) 440 LET Z=(RND(Y)*6+1) 450 LET DR(RN)=INT(Z) 460 GOSUB 500 'Draw the dice 470 PP = PP + 10 480 NEXT RN 499 RETURN 500 '*** Draw the dice *** 510 PRINT@PP,CHR$(235)+STRING$(5,231)+CHR$(236) 520 FOR X = 1 TO 3 530 PRINT@PP+(40*X),CHR$(233)+STRING$(5," ")+CHR$(234) 540 NEXT X 550 PRINT@PP+160,CHR$(237)+STRING$(5,232)+CHR$(238) 560 ON DR(RN) GOSUB 650,700,750,800,850,900 570 RETURN 650 '*** Draw the 1 dice face *** 660 PRINT@PP+83,DT$ 670 RETURN 700 '*** Draw the 2 dice face *** 710 PRINT@PP+44,DT$ 720 ' 730 PRINT@PP+122,DT$ 740 RETURN 750 '*** Draw the 3 dice face *** 760 PRINT@PP+44,DT$ 770 PRINT@PP+83,DT$ 780 PRINT@PP+122,DT$ 790 RETURN 800 '*** Draw the 4 dice face *** 810 PRINT@PP+42,DT$+" "+DT$ 820 ' 830 PRINT@PP+122,DT$+" "+DT$ 840 RETURN 850 '*** Draw the 5 dice face *** 860 PRINT@PP+42,DT$+" "+DT$ 870 PRINT@PP+83,DT$ 880 PRINT@PP+122,DT$+" "+DT$ 890 RETURN 900 '*** Draw the 6 dice face *** 910 PRINT@PP+42,DT$+" "+DT$ 920 PRINT@PP+82,DT$+" "+DT$ 930 PRINT@PP+122,DT$+" "+DT$ 940 RETURN 1000 REM **** RANDONMISE THE RANDOM VALUE **** 1010 TS = VAL(RIGHT$(TIME$,2)) 1020 TM = VAL(MID$(TIME$(4,2)) 1030 FOR N = 1 TO (TM * TS) + 13 1040 Y = RND(1) 1050 NEXT N 1060 RETURN
