Jump to content
jedimatt42

Force Command ver 2.0 : kinda like command.com from 1985 (no TIPI required!)

Recommended Posts

1 hour ago, WhataKowinkydink said:

Well, that would explain why i thought the wiki was on the terse side: i had missed the "Index" with additional details in the upper right.  😕

 

I found the details on Extended BASIC, and hopefully that should clear everything up.   Thanks again 👍

 

You are not the first one to report that the index is not obvious... I'll get creative and bring the page list to the fore-front. 

  • Like 4

Share this post


Link to post
Share on other sites

Update 1.32  - attached in this thread to post #1.

 

I've been working on allowing executables like VIRGIL99 to use SAMS bankswitching for code. I've adapted and improved the cartridge bank switching mechanisms I use for gcc to SAMS... 

 

It's now more natural to use. function declarations are stashed inside an inline function with the name you declared, the inline function decides to call your decorated actual function either directly if you are calling from the same bank, or through a trampoline in the cartridge. The gcc optimizer removes the code path not taken, so for same-bank calling, it is zero overhead. 

 

The exe loader in ForceCommand looks at a header word that indicates if the exe wants SAMS banking. If so it indicates the number of pages of code that will be loaded and organized as pairs of 4k banks... processes have a base page on the stack so exes can be called from others, and the page ids are still just relative within the exe.   My loader loads the indicated amount of 4k pages this way, and then maps the 1st two into A000 and B000. The remainder of the executable file is loaded into C000 - F000. If the exe is larger (the banked code + 16k of data), it will load all remaining pages into additional banks.

 

For my gcc based Makefile, I use a file naming convention where the 8k bank id is prefixed on the module names (.c files) so b0_main.c b1_utils.c, etc.. and then the linkfile understands through wildcards what to include in each overlay address space. And the makefile extracts the binary form and links it into a PROGRAM image file. ForceCommand uses direct-read lvl2 io to load these executables in pieces instead of the LOAD PAB opcode. The exe sams banks are expected to be padded so there is some wasted disk space... 

 

A small example is here: https://github.com/jedimatt42/fcmd/tree/main/example/gcc/samshello

 

A big complicated example is here: https://github.com/jedimatt42/fcmd/tree/main/example/gcc/virgil

 

Executables that have zero as the sams page count still overlay into SAMS if present, such as FCMENU launching another instance of FCMENU and being able to pop back.

 

There are no new external features. I'm releasing this as a milestone after quite a bit of restructuring. The executables from previous releases are not compatible with this release, so update all the files to keep a coherent system.

 

This is probably a release candidate for 2.0 (the version from which I will only make additive/compatible api changes)

  • Like 7
  • Thanks 1

Share this post


Link to post
Share on other sites
1 hour ago, jedimatt42 said:

Update 1.32  - attached in this thread to post #1.

 

I've been working on allowing executables like VIRGIL99 to use SAMS bankswitching for code. I've adapted and improved the cartridge bank switching mechanisms I use for gcc to SAMS... 

 

I...

 

This is probably a release candidate for 2.0 (the version from which I will only make additive/compatible api changes)

Sounds like this is gonna be "much mo' better"!  🙂

 

Thanks, Matt for your dedicated work on this wonderful software!

 

DG

  • Thanks 1

Share this post


Link to post
Share on other sites

I upgraded to version 1.32 and now I cannot seem to access Plato set up as URI2 (http://ti99.irata.online). 

LOAD URI2.PLATO just resets FC.

Could someone please verify that this works on their end?

Share this post


Link to post
Share on other sites

Today I was able to solve a long standing stevie bug. The problem was that Stevie locked up while starting. 
This only happened if I loaded the Stevie cartridge in FG99 after I ran the FC cartridge before.

 

The problem was, that Stevie expected SAMS banks to be in the order of transparent mode
SAMS Regs: >2:>02 >3:>03 >A:>0A >B:>0B >C:>0C >D:>0D >E:>0E >F:>0F 

 

Now, if I run FC and then type "exit", the TI-99/4a returns to the title screen, but SAMS banks stay in the order:
SAMS Regs: >2:>00 >3:>01 >A:>04 >B:>02 >C:>03 >D:>00 >E:>00 >F:>00 
(Tested with FC 1.32)

 

I now changed Stevie in such way, that upon startup and exit it sets the SAMS registers in the order
SAMS Regs: >2:>02 >3:>03 >A:>0A >B:>0B >C:>0C >D:>0D >E:>0E >F:>0F 
I also set SAMS in transparent mode upon exit.

 

I can imagine, that you want to keep the SAMS banks in a particular order when you call an "external" program from FC, but perhaps on FC exit, banks can be reset to the standard order? Could imagine it might solve some hard to find bugs in older software.

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites
1 hour ago, retroclouds said:

Today I was able to solve a long standing stevie bug. The problem was that Stevie locked up while starting. 
This only happened if I loaded the Stevie cartridge in FG99 after I ran the FC cartridge before.

 

The problem was, that Stevie expected SAMS banks to be in the order of transparent mode
SAMS Regs: >2:>02 >3:>03 >A:>0A >B:>0B >C:>0C >D:>0D >E:>0E >F:>0F 

 

Now, if I run FC and then type "exit", the TI-99/4a returns to the title screen, but SAMS banks stay in the order:
SAMS Regs: >2:>00 >3:>01 >A:>04 >B:>02 >C:>03 >D:>00 >E:>00 >F:>00 
(Tested with FC 1.32)

 

I now changed Stevie in such way, that upon startup and exit it sets the SAMS registers in the order
SAMS Regs: >2:>02 >3:>03 >A:>0A >B:>0B >C:>0C >D:>0D >E:>0E >F:>0F 
I also set SAMS in transparent mode upon exit.

 

I can imagine, that you want to keep the SAMS banks in a particular order when you call an "external" program from FC, but perhaps on FC exit, banks can be reset to the standard order? Could imagine it might solve some hard to find bugs in older software.

 

My LOAD command does set them up in the legacy order. But 'EXIT' doesn't restore them there. I thought the FG99 command to jump into another cartridge performs the same setup as LOAD, but I'll have to check. 

 

Thanks for pointing this out. 

  • Like 2

Share this post


Link to post
Share on other sites
7 hours ago, Vorticon said:

I upgraded to version 1.32 and now I cannot seem to access Plato set up as URI2 (http://ti99.irata.online). 

LOAD URI2.PLATO just resets FC.

Could someone please verify that this works on their end?

This appears to be working fine for me. 

Share this post


Link to post
Share on other sites
16 hours ago, Vorticon said:

Ok thanks. I'll keep digging.

 

Since it is such a small URL, from FCMENU, I use the URL directly:

 

LOAD PI.HTTP://TI99.IRATA.ONLINE/PLATO

 

From the command line, I've tested:

 

LOAD PI.http://ti99.irata.online/PLATO

 

TIPIMAP URI2. HTTP://ti99.irata.online/

 

LOAD URI2.PLATO

 

Force Command's TIPIMAP for URI aliases, requires the URL scheme ( HTTP or HTTPS ) to be in allcaps... :(  

 

The hosting webserver requires the path portion to match case... so the "PLATO" part after the hostname... or in the URI2.PLATO must be allcaps. 

 

There might be some noise in the TIPI log file.. The magic for this is in the TIPI. You might get a better TI side error code out of EDITOR ASSEMBLER. When going into legacy mode, Force Command resets the 4a if there is any problem with the file access.

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites
16 hours ago, jedimatt42 said:

 

Since it is such a small URL, from FCMENU, I use the URL directly:

 

LOAD PI.HTTP://TI99.IRATA.ONLINE/PLATO

 

From the command line, I've tested:

 

LOAD PI.http://ti99.irata.online/PLATO

 

TIPIMAP URI2. HTTP://ti99.irata.online/

 

LOAD URI2.PLATO

 

Force Command's TIPIMAP for URI aliases, requires the URL scheme ( HTTP or HTTPS ) to be in allcaps... :(  

 

The hosting webserver requires the path portion to match case... so the "PLATO" part after the hostname... or in the URI2.PLATO must be allcaps. 

 

There might be some noise in the TIPI log file.. The magic for this is in the TIPI. You might get a better TI side error code out of EDITOR ASSEMBLER. When going into legacy mode, Force Command resets the 4a if there is any problem with the file access.

Turns out the PI needed a reboot. I almost never have to do that, but we did have a brief power outage a few days ago so that might have messed up something.

All good now :)

  • Like 5

Share this post


Link to post
Share on other sites

Ok.  Release what I'm calling 2.0 

 

Fixes the issue @retroclouds pointed out. FG99 seems to work with an old version of STEVIE now, which I know didn't work before. 

 

Lot of stuff around the public API documented, and SDK bundled. Check out the Wiki to learn more. 

 

Home · jedimatt42/fcmd Wiki (github.com)

  • Like 8
  • Thanks 2

Share this post


Link to post
Share on other sites
Ok.  Release what I'm calling 2.0 
 
Fixes the issue [mention=16219]retroclouds[/mention] pointed out. FG99 seems to work with an old version of STEVIE now, which I know didn't work before. 
 
Lot of stuff around the public API documented, and SDK bundled. Check out the Wiki to learn more. 
 
Home · jedimatt42/fcmd Wiki (github.com)
Totally awesome6aae51d4b2de6124c54d27ccdc037081.gif

Sent from my Pixel 6 Pro using Tapatalk

Share this post


Link to post
Share on other sites

I think I've updated all my known broken links now, between the wiki, atariage, source readmes, etc... so if anyone detects another, feel free to call it out.

 

Thanks.

 

  • Like 3

Share this post


Link to post
Share on other sites

FYI:

 

When stacking applications like FCMENU that then spawns something like VIRGIL99, ForceCommand currently relies on reading the SAMS mapper registers and storing them on the gcc stack so they can be restored when the child process exits.

 

I have learned from another thread that this is insufficient.

 

Since 'nobody' (in pragmatic terms) has access to anything more than a 1meg SAMS card, this is OK for now... Hopefully I'll fix this before that situation changes. 

  • Like 5

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.
Note: Your post will require moderator approval before it will be visible.

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