Jump to content
jedimatt42

Force Command ver 0.8 : kinda like command.com from 1985

Recommended Posts

Ver 0.8 - May 28th 2019 - forcecmd0_8.zip

 

- Add 'press any key for more...' prompt when scrolling if not in a script. Good for 'dir', ftp's 'dir', type, ftp.whtech.com's adverts on login.

 

Ver 0.7 - May 26th 2019

 

- Turn sound off immediately on program startup

- FTP: Set ascii transfer mode before opening data channel for directory command

- FTP: Wait properly for 226 end of transfer code after get command.

 

Ver 0.6 - May 11th 2019 -

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

post-42954-0-15069000-1557190987_thumb.jpg

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
  • Like 16

Share this post


Link to post
Share on other sites

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

 

[email protected]

  • Like 2

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

  • Like 1

Share this post


Link to post
Share on other sites

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.

 

[email protected]

Share this post


Link to post
Share on other sites

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 [email protected]: THANKS MAN! :thumbsup: :thumbsup: :thumbsup: :thumbsup: :thumbsup: :thumbsup: :thumbsup: :thumbsup: :thumbsup: :thumbsup:

Share this post


Link to post
Share on other sites

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:

post-42954-0-13938000-1557595279_thumb.jpg

 

[email protected]

  • Like 3

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

 

[email protected]

  • Like 1

Share this post


Link to post
Share on other sites
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 --- Ω ---

Share this post


Link to post
Share on other sites

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.

 

[email protected]

  • Like 1

Share this post


Link to post
Share on other sites

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 [email protected]!

 

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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
[email protected]

 

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.

  • Like 1

Share this post


Link to post
Share on other sites

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!

  • Like 1

Share this post


Link to post
Share on other sites

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.

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...