DOS100.CO is a ram version of TS-DOS that Ultimate Rom II will load, run,
and then unload all on the fly when you hit the TS-DOS menu entry in UR2.

It has to be named DOS100.CO (or DOS200.CO or DOSNEC.CO, for 200 and Nec),
and be on the root of the disk.

The "disk" may be any kind of tpdd, from a real tpdd with a floppy, to
laddiealpha to sd2tpdd.

You don't need any other dos installed either in ram or rom. You don't need
floppy.co for instance, or even teeny. UR2 has just enough code to read
dos100.co from a disk, then ts-dos in ram does the rest.

It's ingenious because, not only does it mean you can have ts-dos without
taking up room either on the rom nor in ram (except while actually running)
it also means 30 years after UR2 was written in stone and shipped, you can
have an updated versions of TS-DOS without crafting a new UR2 rom.

And it hardly gets in the way having to have a disk around for it to work,
because, it's a dos we're talking about. If you even want to use it at all,
then almost by definition you have a drive and a disk.

I have not tried anything crazy like taking a copy of teeny.co and naming
it dos100.co to see if UR2 can use teeny on-the-fly in place of ts-dos.

-- 
bkw


On Tue, Oct 15, 2019, 4:22 PM Gary Hammond <[email protected]> wrote:

> 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]
>
> 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
>
>
>
>
>

Reply via email to