Jump to content
IGNORED

ED99 Multi-file Editor


TheBF

Recommended Posts

After trying out a new editor that I have been working on Vorticon suggested that I open a topic for the benefit of the greater group.

Somebody may find it useful. The ability to copy files and lines and paste them into a new composite file is pretty handy or cut a file up into separate files.

It uses key commands for editing and the command line for saving and getting files. DIR and CAT commands are available within the editor because I have a good memory but it's short. :) 

 

ED99-40 column Beta Release 1.1

40 column multi-file editor

 

Changes:

V1.1 built on "new and improved" Camel99 Kernel (thanks Tursi)

Fixed problem: SAMS card was not initialized on startup. Worked on Classic99 failed on real hardware.

Clipboard uses the upper end of SAMS memory so 511 lines can be copied.

Fixed the ED99CONFIG file to use DSK1. to find the font to load.

Four font files have been included with the release. 

 

Feature Additions

  •  FCNT 4 (break) will stop file loading.  The partial file will be in SAMS memory. Use PURGE if you don't want to keep it
  •  FCNT 4 (break) will stop file save. The partial file will be written to disk.
  •  CTRL A will copy entire file to clipboard.
  •  CTRL P will paste entire file to the END of the current file. (Insert can be too slow at this time)
  •  Number of lines in clipboard is displayed on lower right side of editing window
  •  PRINT command prints the active file to any DSR enabled device. 
    • Examples: 
      • PRINT PIO
      • PRINT RS232.BA=9600 
      • PRINT CLIP (Classic99 only)

Limitations

File size is still limited to 511 lines

Inserting to the top of a large file is still slow due to the simple internal data structure.

 

Future

  • 80 Column version and SAMS memory are not playing together nicely. Not sure why yet.
  • Single level undo/redo 
  •  Document user level editor commands for DSK1.ED99CONFIG

 

Bugs from Vorticon's Beta test

  • Pressing <ENTER> after the first line inputted moves the line down and the cursor is positioned above it. It is not possible to enter text below that first line. Is this a feature or a bug?
  • Pasting with Ctrl-P pastes the contents of the clipboard after the End of File marker and adds yet another End of File marker. I would have thought that the pasted text will appear just above the EOF marker...
    •  This should be fixed now. (off by one error...) 

 

Below are the contents of the readme file. 

By the magic of Classic99, in the ED99 command line I typed PRINT CLIP and pasted this into the browser. Pretty cool.

 

README for ED99 Editor   Brian Fox  July 2, 2020
 
ED99-40 is a text editor for the TI-99 COMPUTER
 
It requires the Editor/Assembler cartridge.
 
Starting ED99-40
- To start the program select menu option 5
 
- Place the ED99-40 files on a disk and place it or mount it as DSK1.
 
- At the RUN PROGRAM FILE prompt type:
  DSK1.ED99-40
 
 
=============================
There are 10 files in this package:
 
README.TXT (this file)
 
ED99-40, ED99-41, ED99-42
The 3 binary files of the editor.
 
ED99CONFIG
A DV80 text file with editor commands to
setup the editor the way you want it .
 
*Type EDIT DSK1.ED99CONFIG to alter the file.
 
ED99DOC
A simple list of the key commands and text commands that control the editor
 
FONT FILES
- FONT0230   Default font loaded at start up
- FONTEDT1   Same font use by EDIT40 V3 of the TI E/A editor
- TI99FONT   The standard font used by TI99 BASIC
- FONT004    Alternative font with correct descending lower case letter
 
 
Contact info:
I am commonly available on Atariage.com in TI-99 development forum as theBF.
 

 

ED9940.DSK.zip

  • Like 7
  • Thanks 1
Link to comment
Share on other sites

Sorry for the AMS hassle. The current core of Classic99 requires me to pre-init the AMS registers, and it has bitten numerous people. But remember - you should always initialize all registers of any hardware you're using - don't assume someone else did it. Then you know your software will always work. ;)

 

  • Like 2
Link to comment
Share on other sites

20 minutes ago, Tursi said:

Sorry for the AMS hassle. The current core of Classic99 requires me to pre-init the AMS registers, and it has bitten numerous people. But remember - you should always initialize all registers of any hardware you're using - don't assume someone else did it. Then you know your software will always work. ;)

 

"And still I am learning..."

                  Michelangelo

     

Link to comment
Share on other sites

  • 1 month later...

Word Search for ED99

 

I got a basic word search working in ED99.  It's a brute force string search so it takes 11 seconds or so to search a 500 line file but it still is faster than I can do it with my eyes on a 40 column screen with 80 column lines. :) 

 

You start the process in the command window with the command:

LOC <text> 

 

If it's found the cursor goes to the <text> in the file.

CTRL F will continue  the search to the next instance of <text>

If it hits the end of file you are back in the command interpreter with the message "Can't find it"   so you can try a different search or resume editing.

 

I have to beat it up for awhile but I hope to have something here soon.

 

I have about 2400 bytes left in conventional HI RAM memory for code features if I include LOC and both DIR and CAT commands with the Editor code.

So we are getting near the end without going to SAMS memory for CODE. 

 

If built on the SuperCart version of Forth of course we would have 10K left for the developer to test various pieces of code or add utilities.

Since the compiler is resident these could be "plugins" of Forth source code. :)

 

It's over 600 lines of editor code now and 300 or so lines of library source code. 

 

Adding replace to go with this search could be interesting...

 

 

 

  • Like 6
Link to comment
Share on other sites

Latest version of ED99: V1.3

 

Version 1.3 has the LOC command to find first occurrence from the cursor's line and ctrl F to find the next occurrence in the active file.

The search can only find the first occurrence of a string on a line.  I have not integrated the cursor position into the find next routine.

I will work on that but for now you can find stuff in a big file relatively quickly but you might have to look at the entire line manually.

 

With this addition we have a functional programmers editor I think.

I changed the file name to ED9940.  The hyphen just seemed superfluous :) 

 

Feature Review:

  • CTRL A (copyall) and CTRL P (paste-all) keys let you append files together into a new segment in the editor
  • PRINT command lets you send a file to any valid DSR device including Classic99 CLIP (as far as I have tested)
  • DIR and CAT commands are resident to see disk contents.
  • LOC command "locates" a text string in the file

 

I still have to increase the maximum line limitation for Vorticon and I need to create a 4K gap for inserts so that inserts happen at the page level for most of the file and work line by line in the page being edited. That should make inserting/deleting lines much quicker. (If I can figure it out)

 

Early testing showed this version working in 80 column mode so I hope to get that version out this week. (Also a Vorticon request)

 

Bug:  It is possible somehow to get the cursor past the end of file which confuses the editor.

         Not sure how that is happening yet but it is not very common. Seems hard to reproduce.

 

 

 

ED9940.DSK.zip

  • Like 5
Link to comment
Share on other sites

ED99 80 COLUMN Version

*WARNING*  TESTED ON CLASSIC99 ONLY

 

It all compiled and performed as expected in 80COLUMN mode.  The way the code is written, it uses the screen width variable "chars-per-line"  (C/L) to compute everything screen related so I literally only had to include the DSK1.80COL library file and add the 80COLS command to the editor's boot routine. 

That was way  easier than it could have been. :) 

 

If someone tries it on real iron let us all know if it works as expected please.

 

Binary EA5 filename is:  ED9980

(ED9940 is also in this ZIP file if you need it)

 

 

ED9980COLMODE.png.7fa4f7578ba9c1083cd68ea4a92f773a.png

 

ED99.DSK.zip

  • Like 5
Link to comment
Share on other sites

ED99 BUG FOUND

 

Very sorry. I just found that my file save routine was off by one.

It doesn't save the last line of the file.  If you add an extra line to your file before saving it will work but not very convenient.

My apology.

 

I will fix it in the next release.

 

 

  • Like 1
Link to comment
Share on other sites

  • 2 months later...

ED99 1.5

 

Changes:

  • Faster purge operation (2x)
  • Built on new V2.66 Forth kernel
  • Binary programs created using Forth SAVESYS code instead of using Classic99
  • Editing window expanded to 19 lines versus 16 lines in previous versions.
  • More efficient code for insert mode.

 

Let me know what I did wrong.  It seems better to me but I am biased. :)

 

V2 

My next goal is to move from a record/line based data management to character based data.

This should allow double the line count in each 64K segment which was a requirement of Vorticon.

 

 

 

 

ED99.ZIP

  • Like 2
Link to comment
Share on other sites

  • 2 months later...

ED99 1.6 

 

Finally have something I hope someone can use. It seems to be practical. Please give it try and let me know.

 

I am getting near the limits of this model of the program. The binary is about 20K now and it became unstable when I added a bit of code to add 80 column support.

So this update is for 40 column screens only.  The upside is that it works on a regular TI-99 with only a 1M SAMS card as an upgrade

 

Program Name:  ED9940 

Dependencies:  TI-99, 1M Sams card.  1 disk drive.

Assumptions  :  ED99CONFIG  and FONT0230 must be on DSK1.  (If that is not useable let me know what would be better)

 

Here are the new features:

  • Faster startup. All memory is not purged on startup. Rather it is purged only on loading a file or when entering and un-initialized file buffer.
  • Supports files of 1000 lines.
  • 5 files can be in memory at the same time (reduced from 10) 
  • Text can be cut/copied and pasted into other files inside the editor.
  • TEXT Marking: Ctrl M command  lets you hilight text for Copy, Xtraction or deletion of blocks of text.
  • EDIT:  Forgot to mention I improved the repeating KEY code a bit. More reliable.
  • Paste has been improved to correctly insert copied text at the cursor in the active file.
    • Note: this is still a LINE based editor. The smallest piece of text that can be copied or pasted is one line.

Negatives:

  • On files with 1000 lines, deletions at the top of the file take a 3 seconds. :(   (Deletions at the bottom or on small files are quick.)
    • It's a function of the very simple architecture of the editor.
  • To save space, I did not include an "Are you sure" on SAVE, DEL and SAVEAS commands. You have been warned.
  • Each file grabs 128K of SAMS space. Very wasteful, but easy to implement.

 

Here is the updated Doc file with the new commands for marking, copying, deleting hi-lighted text.

The was generated from ED99 in Classic99  by simply using the PRINT CLIP command from ED99 and pasting it here.  :)

Gotta love Classic99.

 

(Source code is in the ZIP file for those who want to see it) I know you're out there somewhere.

 

EDIT:  Found a bug I thought I fixed.  ^Y is not putting the removed line into the clipboard.

         OH. This is weird. It works as expected on hardware, but is wrong on Classic99.  More research needed.

 

Spoiler

ED99 40/80 Column  KEYBOARD COMMANDS
-----------------------------------------
 
Function               Key
---------             ---------
+TAB                   TAB      / FCNT 7
-TAB                   CTRL TAB / CTRL 7
PgDn                   FCTN 6
Del-Char               PC Delete / FCTN 1  Delete 1 char, delete empty line
Insert/Overwrite       PC Insert / FCTN 2
Insert New-Line        FCTN 8
Erase Line             FCTN 3
Cursor LEFT            PC Arrow / FCTN S
Cursor RIGHT           PC Arrow / FCTN D
Cursor DOWN            PC Arrow / FCTN X
Cursor UP              PC Arrow / FCNT E
Previous Page          PGUP     / FCTN 4
ENTER                  ENTER  (Inserts new line)
ESCAPE to commands     Esc
 
COPYALL                Ctrl A Copy the entire file number to clipboard.
COPY-LINE              Ctrl C Copy 1 line to clipboard
 
DESTRUCTIVE BACKSPACE  Ctrl Backspace / CTRL S
 
HOME                   Ctrl U / PC Home
Goto end of line       Ctrl D
 
PASTE                  Ctrl V  Paste clipboard at cursor line
 
**COPY AND PASTE FUNCTIONS**
----------------------------
MARK TEXT              Ctrl M Go into marking mode
Hilight text           Down arrow/Fcnt X
Un-hilight             Up arrow/Fcnt E
COPY                   Ctrl C
Xtract                 Ctrl X  COPY marked text to blip, delete lines
 
-----------------------------
Next File No.          Ctrl >
Previous File No.      Ctrl <
 
Find Next              Ctrl F  jump to next occurrence of search text
_____________________________
 
 
ED99  TEXT Commands
-------------------
: BYE    exit ED99, return to MENU screen
: GET    <dsk?.path>   load file, remain i iinterpreter
: EDIT   [ <dsk?.path? ]  Optional file papa. Edit the current file OR Load pah
 
*Notice NUMERIC parameters come first.
: GO     ( line# GO )   GOTO the line # in the file
: FILE   ( file# FILE ) select the file# segment
 
: >>     Goto next file#
: <<     Goto previous file#
 
: SAVEAS <dsk*.path> save current file as new file path name
 
: SAVE   Save the current file with current file path.
 
: PURGE  Erase memory for the current file number.
 
: SAVEALL   Save all files that have been updated
 
: DIR  <DSK?.PATH>  Shows disk directory in three columns
 
: CAT  <DSK?.PATH>  Shows catalog of disk with size and type
 
: DEL (DSK?.PATH) Delete the file. If Safety is ON, a Y/N? prompt is added.
 
: PRINT <device>  Print the current file number to the device parameter
 
: LOC  <text>     Search for Text from the cursor postion.
                  Use Ctrl F in editor to find mulitple occurrences
 
DSK1.ED99CONFIG
----------------
ED99 Looks for this file when it starts.
The commands are interpreted by the Forth interpreter that is underneath ED99.
It is used primarily to load the FONT that you want.
The default config file is below:
-----------------------
 
 
\ ED99 CONFIG FILE
 
 CR ." Loading Font: "
 S" DSK1.FONT0230" 2DUP TYPE  LOAD-FONT
 
\ set Editor color variables
BLACK FG !  GREEN BG !
 
 
 
 

 

 

 

ED99-MARKING.png

ED9940V16.ZIP

  • Like 4
Link to comment
Share on other sites

Here is a "watching paint dry" kind of video showing ED99 building on Classic99 at normal speed. It takes 1min, 43 seconds.

 

I think that's pretty quick on a TI-99 to compile 1333 LOC and build the finished binaries.  (?)

I don't know how this compares to other development systems but I am curious.

 

(And... you can light it up immediately if you want without leaving the compiler)

 

  • Like 1
Link to comment
Share on other sites

  • 2 months later...

ED99 V1.61

 

This is more of maintenance release built on a new Forth kernel that has a faster VDP driver.

I did find a bug when pasting in a large file using Classic99. It was a stack underflow that came from V1.6 using new SAMS code and I had not full adapted INSERT-LINE to the new SAMS code.

I have not run this version on hardware yet. I think it will be ok.

 

The source code ED99,FTH file is also in the ZIP file for people with extra time on their hands.  :)

I also included PC  .txt versions of README and ED99DOC for convenience.

 

I would welcome any comments or suggestions. 

If this has no use for anyone else then I will leave at this level of development.

 

ED9940-161.zip

Edited by TheBF
  • Like 2
Link to comment
Share on other sites

12 hours ago, retroclouds said:

I downloaded the zip, but it only seems to contain the "FONT0230" file.

Lol.  I didn't check the zip file clearly.

Late nights and too much terminal time. :)

 

Very sorry.  New zip file is in the previous post.

 

  • Like 1
Link to comment
Share on other sites

  • 1 year later...

ED99 1.7  

 

I found a major flaw in my binary image generator in Camel99 Forth, that affects the reliability of this project. 

I don't expect many (any :) )  people use this editor but if you ever wanted to this version at least doesn't have a hidden bomb in it. :) 

 

There is a help file in the ZIP file with the key commands and command line commands.

The source code is in the file ED99,FTH.

In the version it is assumed that the ED99CONFIG file and fonts are kept on DSK2.

The current features that are interesting: (maybe?)

  • 5 simultaneous files open and 800 lines per file. 
  • hilight (^M) lines and extract (^X) or copy (^C) from file to clipboard
  • Paste clipboard at cursor line (^Y)
  • DIR and CAT commands resident
  • LOC command to find a text string in a file. (Ctrl F to find next occurrence in the editor)
  • PRINT  command to any TI device string or CLIP in Classic99

Release notes contained in the README file: 

 

README for ED99 Editor V1.7 by Brian Fox  Jun 4 2022
 
ED9940 is a MULTI-file text editor for the TI-99 HOME COMPUTER
  
Release Notes:
--------------
This version 1.7 fixes an error in the original binary files.
The error was created by the SAVESYS library in Camel99 FORTH.
The SAVESYS error has been corrected.
 
V1.7 uses a new repeating key library which is faster and more reliable.
 
A COLD command has been added that restarts the editor and reads ED99CONFIG.

 


 

 

Classic99 QI399.046 2022-06-04 4_34_02 PM.png

Classic99 QI399.046 2022-06-04 4_34_52 PM.png

ED9940.zip

  • Like 5
  • Thanks 2
Link to comment
Share on other sites

  • 3 weeks later...

Checking in to see if any of the downloaders finds this Editor useful.

I have time to tinker and about 6K left for more features before needing to expand code into SAMS.

So report any suckage that you find. :) 

 

  • Like 2
Link to comment
Share on other sites

  • 1 month later...

Well after trying to actually use this editor myself for awhile I found out why I got so much user feedback. (zero) ? 

It was pretty buggy.  My apologies to @GDMike for giving it to him earlier. 

 

As a user I became more familiar with all the crap and got serious about fixing the problems.

I am sure it's not 100% but this version is much better.

 

There is now an 80 column executable for F18. It doesn't use any fancy features yet but it works on Classic99.

I got used to 80 columns pretty fast. :)

 

Use ED99 and type EDIT DSK?.ED99MANUAL to see the key commands and command line commands. 

(? is whatever disk you put it on)

 

Important Installation Notes:

Simplest install is unzip the files into a FIAD folder on Classic99 and make that folder DSK1.

If you choose another disk, ED99CONFIG file must be on DSK1. 

 

Start at E/A menu 5:   DSK1.ED9980   -or- DSK1.ED9940

 

 

FONT0230 is on DSK1.  by default. 

Change ED99CONFIG file (with ED99 :)  type: EDIT DSK1.ED99CONFIG)  

 

This line: (the leading space after S" is required) 

 S" DSK1.FONT0230" LOAD-FONT

 

 

ED99 v1.73 Release Notes
This is mostly a bug fix release.

  • ED9940 and ED9980 are now built from the same code base
  • Optimized screen refreshing so that cursor movement is smoother and faster.
  • SAMS card is tested on startup. Aborts with error message if card fails. 
  • Solved the random char insertion problem by re-writing RKEY for ED99.
  • Changed the MARK and select function:
    • Hitting ^M now hi-lights the cursor line immediately.
    • You can only select downwards
  • Added cursor SPEED control that can be changed in ED99CONFIG
    • OR from the command line in the editor.
  • This is done by assigning a value to CSPEED
    • Example: 200 TO CSPEED

 
Source code is provided with this release.

(It will not compile on the V2.68 Forth. 2.69 is coming...)

  •  ED99COMMON is most of the editor code
  •  ED9940MAK builds the 40 column executables 
  •  ED9980MAK builds the 80 column executables

     

ED99-173.ZIP

Edited by TheBF
ADDED START INSTRUCTIONS
  • Like 7
Link to comment
Share on other sites

1 hour ago, TheBF said:

Well after trying to actually use this editor myself for awhile I found out why I got so much user feedback. (zero) ? 

It was pretty buggy.  My apologies to @GDMike for giving it to him earlier. 

 

As a user I became more familiar with all the crap and got serious about fixing the problems.

I am sure it's not 100% but this version is much better.

 

There is now an 80 column executable for F18. It doesn't use any fancy features yet but it works on Classic99.

I got used to 80 columns pretty fast. :)

 

Use ED99 and type EDIT DSK?.ED99MANUAL to see the key commands and command line commands. 

(? is whatever disk you put it on)

 

Important Installation Notes:

Simplest install is unzip the files into a FIAD folder on Classic99 and make that folder DSK1.

If you choose another disk, ED99CONFIG file must be on DSK1. 

 

Start at E/A menu 5:   DSK1.ED9980   -or- DSK1.ED9940

 

 

FONT0230 is on DSK1.  by default. 

Change ED99CONFIG file (with ED99 :)  type: EDIT DSK1.ED99CONFIG)  

 

This line: (the leading space after S" is required) 


 S" DSK1.FONT0230" LOAD-FONT

 

 

ED99 v1.73 Release Notes
This is mostly a bug fix release.

  • ED9940 and ED9980 are now built from the same code base
  • Optimized screen refreshing so that cursor movement is smoother and faster.
  • SAMS card is tested on startup. Aborts with error message if card fails. 
  • Solved the random char insertion problem by re-writing RKEY for ED99.
  • Changed the MARK and select function:
    • Hitting ^M now hi-lights the cursor line immediately.
    • You can only select downwards
  • Added cursor SPEED control that can be changed in ED99CONFIG
    • OR from the command line in the editor.
  • This is done by assigning a value to CSPEED
    • Example: 200 TO CSPEED

 
Source code is provided with this release.

(It will not compile on the V2.68 Forth. 2.69 is coming...)

  •  ED99COMMON is most of the editor code
  •  ED9940MAK builds the 40 column executables 
  •  ED9980MAK builds the 80 column executables

     

ED99-173.ZIP 49.1 kB · 1 download

Actually I think I think I downloaded it, but we had storms roll thru at the same time and then I got busy with something and next thing I know, that had decided to add something to SNP and yada yada..so, I'll look at this version later this evening though. No apologies needed at all.

  • Like 2
Link to comment
Share on other sites

 

Added more info to post.

 

Ok..hmm. I didn't get it to load. I'd have to rework files in my drive 1 and I'm working out of drive 4.

I think Theres a couple files that have to specifically be in drive 1. I couldn't keep up with all of them and make it load from drive 4, my work folder.

I tried include ed9980 or something like that and it started loading and froze and I was thinking I had everything duplicated in drives 1 and 4 so I didn't have to worry about where everything was.

 

For me, at the moment, it's too many misc files that have a dedicated position, and I'm confused on what needs loading first before loading the editor, I think I have to load tools too?

But again, I was rushed this evening and was worried about losing or messing up my drive 1 that had other dedicated files from TurboForth and editor assembler. I was making copies and copies of that and date stamping those copies.

When I loaded another classic 99 session, it remembered my drives and so that didn't work as I was hoping to have two sessions with independence and my brain doesn't know how to handle drives 7,8 and 9 yet.

And Atariage won't allow my video uploads anymore either so showing you that easy way has become harder too. They want me to zip the file and send but I got file too large..

I don't have a utube account and im really not looking for another application just for video or file share.

The best way for me is going to be to let Brian invite us or me to a zoom meeting and see this live.

Yes, I have to be held by the hand ?.

 

 

 

 

Edited by GDMike
Link to comment
Share on other sites

The default setup is that ONLY 2 files need to be on DSK1.

 

ED99CONFIG

FONT0230

 

The rest can be on any disk.

 

BUT I have edited the ED99CONFIG for you  to get the font file from DSK4. It's in the zip file.

Here is what it now says

CR .( Initializing SAMS card...)
  SAMSINI
 
CR .( Loading Font...)
   S" DSK4.FONT0230" LOAD-FONT
 
\ For reference, here are the valid color names
\ TRANS   BLACK    GREEN   LTGRN
\ BLUE    LTBLUE   RED     CYAN
\ MEDRED  LTRED    YEL     LTYEL
\ DKGRN   MAGENTA  GRAY    WHITE
 
CR .( Set editor colors ...)
   GRAY  TO FG
   BLUE  TO BG
 
200 TO CSPEED  ( sets the repeating cursor speed)

 

Unzip this file into your DSK1. 

All the other files can stay on DSK4. 

 

Let me know how it goes. :) 

 

 

ED99CONFIG.zip

  • Like 3
Link to comment
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...