Jump to content

Photo

Force Command : kinda like command.com from 1985


36 replies to this topic

#1 jedimatt42 OFFLINE  

jedimatt42

    River Patroller

  • 2,023 posts
  • Location:Beaverton, OR

Posted Mon May 6, 2019 7:13 PM

Ver 0.6 - May 11th 2019 - Attached File  forcecmd0_6.zip   22.85KB   20 downloads

- Added /ansi option to type command
- Fixed help suggestions from Lee, and found a few more.
- Increased variable value length, and added length checking

Ver 0.5 - May 6th 2019
 
- Added 'IF' statement

Ver 0.4 - May 5th 2019

- Added initial FTP get functionality

----
 
Now that it has 'if' you can use it to make pretty custom menus, get keyboard input and conditionally operate on that input...
 
----
Force Command

A auto starting command module GROM and ROM pair. The GROM just kicks off the ROM.

Contains all the commands from TIPIFM for file and directory management in a mult-DSK... and TIPI aware way.
So, you can copy files to and from TIPI. You can copy files to and from 2 devices that both think they are DSK1.

Since TIPIFM, this has added:
* scripting support with the 'call' command.
* EA5 loading with 'load' command.
* FG99 cartridge swapping with 'fg99' command.
* an FTP client that supports 'get', TIFILES, and foreign files
* variables, labels, goto, if, keyboard input from script
* ANSI display
---- 
 
Using PabloDraw on my linux machine, I created this sample ANSI screen:

Attached File  IMG_20190506_173702425.jpg   604.64KB   2 downloads

I use a script on the 4A that displays the file, then loops on keyboard input, and launches the option chosen.
```
readkey K
if $(K) == F then goto LNFB
...
LNFB:
tipimap DSK1 TIPI.FB4TH210
fg99 FBFORTH
```

Like how you might have done it back in MS DOS 2.11

You can also emit ansi escape codes with the echo command.

----
Full Help Dump
----
 
call <filepath> - run a script. Must be DISPLAY VARIABLE file.

Special file: AUTOCMD - First drive will be scanned for existance of AUTOCMD. If present it will run.
Some behavior changes when AUTOCMD is found:
 * startup banner is suppressed.
 * initial tipibeeps sound is suppressed.
cd <path>|.. - switch to a different drive or directory
checksum <file> - 16 bit checksum of a file in the current directory
cls - clear the screen and relocate cursor to upper left
color <F> [B] - set text and background color (0-15)
  F - foreground text color
  B - optional, background color
In 80 column mode, this sets colors for subsequent text, and current border.
In 40 column mode, it sets the full screen colors.
colors are TI 
copy <filename> <path> - copy a file to a different directory or device
delete <filename> - delete file in current directory
dir [/w] [path] - list current directory or directory for given path
  /w : optional. Output a simplified listing in multiple columns
drives - list device names grouped by CRU base address
echo [/n] [text] - print text to ANSI terminal screen
  /n : optional, do not print newline after text
substitutions:
 * '\e' : will output an ESCAPE, ascii 27 character
env - list all variables and their values

Variables are set by assigning a name of up to 10 characters a value, or by specific commands.

example: NAME1=FLINSTONE
Variable names are case insensitive.
Variables may be used in any command by the '$' + <name> format.
You may disambiguate with the '$' '(' <name ')' syntax.

examples:
  echo $NAME1
  echo $(NAME1)A99
exit - quit Force Command
fg99 <cart> - load cartridge from FinalGROM99 sd card
  cart - maximum 8 character name without the '.bin'
ftp - open an ftp prompt. Data connection will be in passive mode only.
goto <label> - jump to the line following a label
help - list available commands
help <command> - show help for individual command
if <expr> then <command> - conditional statement
expression following 'if' is evaluated. If the expression evaluates to true, the rest of the command is executed.
example:
  if $A == C then goto LC
expressions syntax: [not] <lvalue> ' ' <operator> ' ' <rvalue>
 <lvalue> - quoted string which may contain variable references
 <rvalue> - quoted string which may contain variable references
 <operator> - '=='
load <file> - load and run an EA5 program image file or files
lvl2 <crubase> - list level 2 I/O subprograms in DSR ROM at the specified CRU base address
mkdir <dirname> - create new directory in current path
protect <filename> - protect a file in current path
readkey <varname> - set varname to value of key currently pressed
rename <old-name> <new-name> - rename a file or directory in the current path
rmdir <dirname> - remove a child directory from the current directory
tipibeeps - play tipi styled sound list
tipimap [/c] [ auto on|off ] [ <drive> [path] ] - set or get a tipi drive mapping
    If no drive is specified, all configuration items are listed
  /c - optional. If specified, erases the specified drive mapping
  drive - the name of the drive
  path - the directory to set
  auto - set to on or off to map DSK1 when PROGRAM image is loaded
type [/ansi] <filepath> - copy the contents of the file to the screen
  /ansi - optional. Open in DISPLAY/FIXED mode instead of DISPLAY/VARIABLE
          and terminate output on CTRL-Z character (26)
unprotect <filename> - unprotect a file in current path
ver - display Force Command version information
width <40|80> - change display to 40 or 80 column mode


#2 arcadeshopper ONLINE  

arcadeshopper

    River Patroller

  • 4,401 posts
  • Location:Portland, Oregon USA

Posted Mon May 6, 2019 9:18 PM

totally awesome



#3 jedimatt42 OFFLINE  

jedimatt42

    River Patroller

  • Topic Starter
  • 2,023 posts
  • Location:Beaverton, OR

Posted Tue May 7, 2019 5:11 PM

Since the shell terminal is ANSI, the 'type' command is an ANSI file viewer.

I don't know what format an ANSI file on the 4A or Geneve would have been in BITD. 'type' expects D/V80

-M@

#4 TheMole OFFLINE  

TheMole

    Dragonstomper

  • 820 posts
  • Location:Belgium

Posted Wed May 8, 2019 7:17 AM

Incredibly cool!



#5 BeeryMiller ONLINE  

BeeryMiller

    Dragonstomper

  • 953 posts
  • Location:Campbellsburg, KY

Posted Wed May 8, 2019 8:17 AM

Might want to add something along "TIPI compatible" in the subject heading.  Almost did not realize this was a TIPI compatible program/etc. as I do not read all the topics for the TI-99/4A.



#6 twoodland OFFLINE  

twoodland

    Moonsweeper

  • 277 posts
  • Location:Delaware, OH

Posted Wed May 8, 2019 4:31 PM

M@ this is so cool!  Thank you so much for your knowledge and time spent.  You ROCK! 



#7 InsaneMultitasker OFFLINE  

InsaneMultitasker

    River Patroller

  • 2,467 posts

Posted Wed May 8, 2019 5:51 PM

For BBS and Geneve use cases only: DF128.    ANSI files have been stored this way primarily to facilitate easy terminal-based file exchanges between PC and TI/Geneve systems and to distinguish from the variable-record TI-style text files.  ANSI file content termination is often the null character 0x00 or the final record may be padded with nulls, carriage returns, or some other character like CTRL-Z.  Not a standard, just the way it has been handled for these cases.



#8 Lee Stewart ONLINE  

Lee Stewart

    River Patroller

  • 3,990 posts
  • Location:Silver Run, Maryland

Posted Thu May 9, 2019 3:01 AM

Ver 0.5 - May 6th 2019 - attachicon.gifforcecmd0_5.zip

. . .

----
Full Help Dump
----

. . .

 

Unsolicited proofreading markup of “Full Help Dump” sent in PM.  :-D

 

...lee



#9 jedimatt42 OFFLINE  

jedimatt42

    River Patroller

  • Topic Starter
  • 2,023 posts
  • Location:Beaverton, OR

Posted Thu May 9, 2019 9:41 AM

Might want to add something along "TIPI compatible" in the subject heading.  Almost did not realize this was a TIPI compatible program/etc. as I do not read all the topics for the TI-99/4A.


By that logic I would have to add: Floppy, hard drive, ram disk, 32k, F18A, composite, FinalGrom, ubergrom, and TIPI compatible.

Of course I haven't tested ubergrom or ramdisks or hard drives, but they should work.

There is a checksum command you can run to see if the set of blocks for the file are the same before and after a copy.

Known bug: protected files mess up the directory listing.

-M@

#10 --- Ω --- OFFLINE  

--- Ω ---

    Hexacorerunner

  • 14,010 posts
  • Location:82.102.25.76

Posted Fri May 10, 2019 9:13 AM

Ver 0.5 - May 6th 2019 - attachicon.gifforcecmd0_5.zip

 

:-o  OMG!  :-o

 

It looks like I've spent too much time away from AA lately.  Could this be the holy grail?

I'm ashamed to admit that I just found out about this in a PM from Greg, but from what I've seen (so far), it looks FANTASTIC! 

I will say, at first glance it looks like I'll have some studying to do.

 

This program is obviously worthy of a dedicated users thread to be sure.  Maybe an entry level type document and more examples of user generated menus and stuff.

 

ATTENTION M@ THANKS MAN!  :thumbsup:  :thumbsup:  :thumbsup:  :thumbsup:  :thumbsup:  :thumbsup:  :thumbsup:  :thumbsup:  :thumbsup:  :thumbsup: 



#11 jedimatt42 OFFLINE  

jedimatt42

    River Patroller

  • Topic Starter
  • 2,023 posts
  • Location:Beaverton, OR

Posted Sat May 11, 2019 11:21 AM

updates in post #1

Fixed some help text issues.
Added '/ansi' option to 'type' command that opens in DISPLAY/FIXED, and terminates on CTRL-Z in file... so we don't have to see the SAUCE

---
Bugs:

Found some issues with the EA5 loader... TENNIS comes up with the racket garbled where in CALL TIPI, it comes up fine. So I'll need to go back and see what initialization I missed.

---
If you have a FinalGROM, TIPI, and F18A, you can see for yourself:
 
call PI.HTTPS://www.jedimatt42.com/4afiles/menu/GAMES005.TXT
(no there isn't 1-4... this just saves money on invalidation requests to aws-cloudfront)
(F18A needed cause this menu is for 80 column color, but techniques would work in 40 column mode)

You can look at that text file in your browser too for an example of a menu program...
This one has all the ansi art in the form of echo statements...

This picture is a little old, but gives you the idea:
Attached File  IMG_20190506_221452546.jpg   492.11KB   0 downloads

-M@

#12 --- Ω --- OFFLINE  

--- Ω ---

    Hexacorerunner

  • 14,010 posts
  • Location:82.102.25.76

Posted Sat May 11, 2019 2:52 PM

Does anyone want to take the lead and make a users manual for this, or maybe a video as well?  I'm probably going to end up making this program my main environment to work from within, but being and old dog, new tricks, and lack of time, means getting up and running will be a little slow.



#13 jedimatt42 OFFLINE  

jedimatt42

    River Patroller

  • Topic Starter
  • 2,023 posts
  • Location:Beaverton, OR

Posted Sat May 11, 2019 3:01 PM

Does anyone want to take the lead and make a users manual for this, or maybe a video as well?  I'm probably going to end up making this program my main environment to work from within, but being and old dog, new tricks, and lack of time, means getting up and running will be a little slow.


I've often thought it would be cool to do a retro style manual with the old 4A desktop publishing software... but really don't remember how to use any of that...

-M@

#14 jedimatt42 OFFLINE  

jedimatt42

    River Patroller

  • Topic Starter
  • 2,023 posts
  • Location:Beaverton, OR

Posted Sat May 11, 2019 4:29 PM

I'll work on docs and examples here where they belong:

https://github.com/j...att42/fcmd/wiki

All the help text in post 1 is also available in program with the help command.

-M@

#15 --- Ω --- OFFLINE  

--- Ω ---

    Hexacorerunner

  • 14,010 posts
  • Location:82.102.25.76

Posted Sat May 11, 2019 8:32 PM

I'll admit it, I was starting to lose interest, but M@, but M@....

 



#16 --- Ω --- OFFLINE  

--- Ω ---

    Hexacorerunner

  • 14,010 posts
  • Location:82.102.25.76

Posted Sat May 11, 2019 8:41 PM

call PI.HTTPS://www.jedimatt42.com/4afiles/menu/GAMES005.TXT

 

Curious, any plans for an extended CALL command?  Something like...

 

SEND MENU

 

Where SEND would act like the call command, but send the contents of a DV/80 file, in this case the text quoted above in a file called MENU.  This would enable users to create their own shortcuts while eliminating a lot of typing.

 

** EDIT **

 

I imagine something like this could also be used to access the weather, sort of like Greg's program, but return the data in full 80 columns.


Edited by --- Ω ---, Sat May 11, 2019 10:07 PM.


#17 --- Ω --- OFFLINE  

--- Ω ---

    Hexacorerunner

  • 14,010 posts
  • Location:82.102.25.76

Posted Sat May 11, 2019 10:28 PM

I tried the above, but it seems to lockup and return nothing...

 

Attached Files

  • Attached File  Nada.jpg   129.27KB   1 downloads


#18 jedimatt42 OFFLINE  

jedimatt42

    River Patroller

  • Topic Starter
  • 2,023 posts
  • Location:Beaverton, OR

Posted Sat May 11, 2019 11:32 PM

I tried the above, but it seems to lockup and return nothing...


I must admit I made TIPI updates, and forgot they are required to get that web hosted menu to work.

-M@

#19 jedimatt42 OFFLINE  

jedimatt42

    River Patroller

  • Topic Starter
  • 2,023 posts
  • Location:Beaverton, OR

Posted Sat May 11, 2019 11:52 PM

Curious, any plans for an extended CALL command?  Something like...
 
SEND MENU
 
Where SEND would act like the call command, but send the contents of a DV/80 file, in this case the text quoted above in a file called MENU.  This would enable users to create their own shortcuts while eliminating a lot of typing.
 
** EDIT **
 
I imagine something like this could also be used to access the weather, sort of like Greg's program, but return the data in full 80 columns.


I don't think I really understand... The term 'SEND' isn't making sense to me... where is it sending the contents of the D/V80 file?

You can do this, if you just need a shortcut:
 
GAMES=call PI.HTTPS://www.jedimatt42.com/4afiles/menu/GAMES005.TXT
 
That can go in your TIPI.AUTOCMD file, then the variable can be referenced:
 
$GAMES
Variables are expanded in a pre-process pass on any command, so they don't have to just be used in IF statements. In fact, IF doesn't know about variables at all... variables are expanded before parsing as a command.

I would eventually want to add the PATH variable concept to search for scripts or programs to run from.

For now you can have a directory with shortcut scripts and just use call to invoke them. If you had shortcuts in directory TIPI.S. such as a file called TIPI.S.MENU that contains the big long CALL with the URL, then you can CALL TIPI.S.MENU

Scripts can CALL other scripts.

-M@

#20 --- Ω --- OFFLINE  

--- Ω ---

    Hexacorerunner

  • 14,010 posts
  • Location:82.102.25.76

Posted Sun May 12, 2019 6:56 AM

I must admit I made TIPI updates, and forgot they are required to get that web hosted menu to work.

-M@

 

Yup!  That worked!  Thanks M@!

As for your message #19, I'll respond to that after I get home from work home tonight, right now I'm outta time and have to split.

Attached Files

  • Attached File  Yup!.jpg   122.96KB   0 downloads


#21 --- Ω --- OFFLINE  

--- Ω ---

    Hexacorerunner

  • 14,010 posts
  • Location:82.102.25.76

Posted Sun May 12, 2019 4:07 PM

Is anyone else having issues trying to access physical disks?  

 

Never mind!  RTFM Omega!  This Force Command is slicker than snot on ice!  

 

The change directory command uses the CRUBASE as well, so I can actually have two DSK1.'s and can switch between them!  Cool beans M@!

 

CD 1000.DSK1.  (for my TIPI DSK1.)

CD 1100.DSK1.  (for my P-Box DSK1.)

 

As I ...slowly... learn more about this DOS, I'm convinced there will be a lot of us converting to and using this before too long.


Edited by --- Ω ---, Sun May 12, 2019 6:08 PM.


#22 --- Ω --- OFFLINE  

--- Ω ---

    Hexacorerunner

  • 14,010 posts
  • Location:82.102.25.76

Posted Sun May 12, 2019 6:48 PM

I don't think I really understand... The term 'SEND' isn't making sense to me... where is it sending the contents of the D/V80 file?

 

I'll try to be a little bit more precise in what I was thinking...

 

The idea would have been to 'send' the contents of an individual file to the Rpi via a modified "call pi.https://" to whatever was specified in the individual file without the need to modify the AUTOCMD file.

 

Say for instance I wanted to load your game menu up, instead of typing the whole thing every time, I could save that information in a DV/80 file called "GAMES" then when I wanted to load it up, I'd just type 'SEND GAMES' from the DOS command.  Over time I could add additional DV/80 files for additional sites or applications and effectively "grow my DOS" to suit my personal needs without having to mess with my AUTOCMD file and risk effing it up along the way.

 

I hope that was little clearer.



#23 jedimatt42 OFFLINE  

jedimatt42

    River Patroller

  • Topic Starter
  • 2,023 posts
  • Location:Beaverton, OR

Posted Sun May 12, 2019 8:02 PM

I'll try to be a little bit more precise in what I was thinking...
 
The idea would have been to 'send' the contents of an individual file to the Rpi via a modified "call pi.https://" to whatever was specified in the individual file without the need to modify the AUTOCMD file.
 
Say for instance I wanted to load your game menu up, instead of typing the whole thing every time, I could save that information in a DV/80 file called "GAMES" then when I wanted to load it up, I'd just type 'SEND GAMES' from the DOS command.  Over time I could add additional DV/80 files for additional sites or applications and effectively "grow my DOS" to suit my personal needs without having to mess with my AUTOCMD file and risk effing it up along the way.
 
I hope that was little clearer.


I think you can just use the CALL command to do what you want...

create a D/V80 file named GAMES containing:
 
call PI.HTTPS://www.jedimatt42.com/4afiles/menu/GAMES005.TXT
  
and from the Force Command prompt type
 
call GAMES
-M@

Edit: I do plan to establish a PATH variable like in command.com for Force Command, and look for scripts after looking at built-ins in the command handler.

#24 --- Ω --- OFFLINE  

--- Ω ---

    Hexacorerunner

  • 14,010 posts
  • Location:82.102.25.76

Posted Sun May 12, 2019 8:19 PM

I think you can just use the CALL command to do what you want...

create a D/V80 file named GAMES containing:
 

call PI.HTTPS://www.jedimatt42.com/4afiles/menu/GAMES005.TXT
   
and from the Force Command prompt type
 
call GAMES

 

I'll be dammed!  This is EXACTLY what I wanted!  It works flawlessly!  

I'm a totally happy camper! 



#25 --- Ω --- OFFLINE  

--- Ω ---

    Hexacorerunner

  • 14,010 posts
  • Location:82.102.25.76

Posted Sun May 12, 2019 8:51 PM

When the need for feature creep sets in... "TIME" would be a nice addition to the command set.  I'd like to eventually add the current TIME/DATE to my AUTOCMD bootup screen sometime in the future.






1 user(s) are browsing this forum

1 members, 0 guests, 0 anonymous users