Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 05:45 19 Jun 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : MMEdit V5.2

     Page 1 of 7    
Author Message
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5950
Posted: 07:06am 13 Aug 2023
Copy link to clipboard 
Print this post

MMEdit V 5.2.0 beta.

This is a major update behind the scenes.

The latest PureBasic update includes a newer version of Scintilla, the framework that handles all the editor features.
This update fixes two long-standing issues. The option to select Propper case now works. You can choose between UPPERCASE, lowercase or Propper Case for the keyword display. This is only cosmetic and serves no useful purpose as far as MMBasic is concerned.
In Linux, the syntax help (F1) now appears the same as in the Windows version. The status line hint is still there and remains on display until you move to a new line.
This Scintilla update also created a problem - random crashes which the debugger couldn't identify. The cause has since been identified and (hopefully) remedied.
This was a blessing in disguise as it encouraged me to change the way multiple open files are handled. Instead of one editor and switching between files, MMEdit now opens multiple editors and simply hides the ones not currently active. This is much faster to switch tabs and does a better job of returning to the previous tab with all things retained, including undo-redo etc.
You are restricted to 15 open files but this can be changed with a setting in the inf file. The more files you have open, the slower it is to load them and processes such as ‘backup’ will also take longer. Too many open files is not a good idea.
Other changes
User variables are now colour-coded and in autocomplete (provided OPTION EXPLICIT is used). If you don't like this, change the colour of user-variables to black.
To make it look like you are organised and a proficient typist, there is a new option in the Program menu. "Cleanup labels" will scan the code and change the case of all user variables and sub names to match the case used in the definition line.
Files which are in the MRU list or restored on startup will have their cursor position and any code folding remembered.
Timed backups are finally functional.
Provided you have configured the backup folder and set a backup time (in minutes), backup will occur. Backups are created if the original file has changed since the last save or backup. All open files are checked, not just the current file. It is up to you to decide if you will risk having all the bas files and the backups reside on the same drive.
Undo/redo is no longer reset when doing upload/deploy. It is still reset during normal ‘save’
The editor line and character count is now updated every 3 seconds rather than when entering a new line.
Support provided for TinyBasic as used on the ATTiny85. See the tutorial in the MMEdit help.

MM Control Centre changes.
Ther have been significant changes in the File Manager.
The PC file listing is the same as before. Speed of loading a new folder list is much faster than previous versions but there can still be noticeable delays.
If you select a directory using the “Change” button above the listing, the new folder is remembered in a “Recent folders” list. Up to 10 folders are remembered. This list is saved between sessions.
Changing folders within the file listing by clicking on folder names is not remembered other than the current folder when the file manager is shut down.
You can now use the delete key (as well as the Delete button) to delete files on the PC or ‘mite
In order to allow suspect CH340 chips to function in Windows, the serial port is opened at 2400 baud and then changed to the required rate while the port is open. This feature can be disabled in MMCC.inf.
There have been a number of minor bug fixes and cosmetic changes.
VK7JH
MMedit   MMBasic Help
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5950
Posted: 07:08am 13 Aug 2023
Copy link to clipboard 
Print this post

Tiny Basic on the ATTiny85 makes a convenient remote sensor platform for the micromite family.

Due to the extremely constrained memory, normal Basic syntax is not viable. MMEdit lets you code in 'readable' basic and switch to the compressed machine version and back again.

Write your code like this:

10 M = 64: FOR J =-20 TO 20
 20 FOR I =-40 TO 40
 30 V = J*4:U = I*3-40:X = U :Y = V :N = 0
 40 R = X*X/M :Q = Y*Y/M : IF R+Q >256 GOTO 80
 50 IF N >= 64 GOTO 70
 60 Y = 2*X*Y/M+V :X = R-Q+U :N = N+1: GOTO 40
 70 ? " ";: GOTO 130
 80 N = N-N/5*5: IF N = 0 ? "@";
 90 IF N = 1 ? "$";
100 IF N = 2 ? "#";
110 IF N = 3 ? "%";
120 IF N = 4 ? "&";
130 NEXT I : ? : NEXT J



and use 'format' to change it to:

1 M=64:F.J=-20TO20
2 F.I=-40TO40
3 V=J*4:U=I*3-40:X=U:Y=V:N=0
4 R=X*X/M:Q=Y*Y/M:IFR+Q>256G.8
5 IFN>=64G.7
6 Y=2*X*Y/M+V:X=R-Q+U:N=N+1:G.4
7 ?" ";:G.13
8 N=N-N/5*5:IFN=0?"@";
9 IFN=1?"$";
10 IFN=2?"#";
11 IFN=3?"%";
12 IFN=4?"&";
13 N.I:?:N.J



The first step is to select "ATTiny" as the syntax. If you don't strange things might happen.

You can use 'format' to switch between the two views at any time. Use whichever view you prefer to enter code in.
The keyword shortcuts (F. for FOR etc) are created using the keyword order in ATTiny.tkn so it is important to preserve the order if you alter the file.

When entering code, the line numbers are automatically inserted. If you are adding code to the end of the file, the usual step of 10 is used.
If however, you are inserting lines, a step of 1 is used to 'hopefully' keep the line numbering in order.

Don't want the line number added, SHIFT-ENTER or right click to bring up a pop-up menu and use the first item "<Enter>"
A new line is added without any "extras"

When you switch between views, the lines are renumbered. Readable code has a line-number step of 10 while the compressed view uses 1 as the step. This can save a few precious bytes.
Any GOTO or GOSUB targets are changed to suit the new line numbers except when you have used an expression as the target.
A line such as
7 N=N-N/5*5:GOS.N+9
will not convert correctly.

Sending the code to the ATTiny85.

If you use a terminal program such as TeraTerm, you will need a character delay of 1mS. Once that is set, a copy and paste into the terminal should work.

If you are using MMCC as the terminal, set the device type to "ATTiny85", set the port, and a baudrate of 38400.
Programs should transfer without any issues.

If using TeraTerm etc, it is up to you to erase any existing program before transferring the new program.
MMEdit does issue a NEW before transferring code (unless you have specified \nonew).

Jim
Edited 2023-08-13 17:09 by TassyJim
VK7JH
MMedit   MMBasic Help
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5950
Posted: 07:14am 13 Aug 2023
Copy link to clipboard 
Print this post

I have tested this version for a while now but I am sure that someone will find some bugs. Hence the beta designation.
There has also been some last minute additions - fixing the CH340 bug etc.

I also have to finish some of the help files, particularly the tutorials.

Jim
VK7JH
MMedit   MMBasic Help
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 3701
Posted: 08:20am 13 Aug 2023
Copy link to clipboard 
Print this post

Jim,

The tkn file contains the translation for the abbreviations?
When I modify this file I can adapt MMEdit to the Arduino UNO version of tinybasic I have?

That would be great...

Volhout
Edited 2023-08-13 18:21 by Volhout
PicomiteVGA PETSCII ROBOTS
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5950
Posted: 08:26am 13 Aug 2023
Copy link to clipboard 
Print this post

  Volhout said  Jim,

The tkn file contains the translation for the abbreviations?
When I modify this file I can adapt MMEdit to the Arduino UNO version of tinybasic I have?

That would be great...

Volhout

I had thought you might be interested.
The file has to be in the correct order with the full name of the keyword.
MMEdit then calculates the shortest abbreviation for each word.

I might be able to allow for more than one tiny basic syntax file.
In the next update.

Jim
VK7JH
MMedit   MMBasic Help
 
William Leue
Guru

Joined: 03/07/2020
Location: United States
Posts: 393
Posted: 03:38pm 23 Aug 2023
Copy link to clipboard 
Print this post

Jim, I have been using an older version for some time and it is working great on Windows 11.

-Bill
 
Turbo46

Guru

Joined: 24/12/2017
Location: Australia
Posts: 1598
Posted: 05:06am 26 Aug 2023
Copy link to clipboard 
Print this post

Hi Jim, The keyword "Image" was not being capitalised and highlighted for the PicomiteVGA so I added it to both of the the .tkn files (in alphabetical order) and that fixed it.

Also something is still confusing me about the syntax. I have two programs loaded into MMEdit the first is a DOS one and the second is a PicomiteVGA one. With the PicomiteVGA tab open I select PicomiteVGA as the syntax that shows in the status line at the bottom. Close MMEdit an then reopen it. The correct syntax shows at the bottom but the syntax in the menu dropdown has DOS selected.

As a test, I closed the DOS program tab and loaded it again in the second tab. Selected the PicomiteVGA program tab set the syntax to PicomiteVGA shut down and restart. Still the same. It seems that it always starts with the DOS syntax highlighted in the syntax dropdown.

Is this expected? Should I just find something important to worry about?

Bill
Keep safe. Live long and prosper.
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5950
Posted: 07:39am 26 Aug 2023
Copy link to clipboard 
Print this post

  Turbo46 said  
Is this expected? Should I just find something important to worry about?

Bill

Definitely, strange things are always expected!

I have been working on the syntax memory problems and think I have it fixed now.
There were a few other strange things happening related to the syntax issue and once I worked out the sequence of events that reproduced the errors, I was able to fix them too.

Thanks for the IMAGE missing word. It is difficult to keep up with the various platforms.

I have been experimenting with multi word code completion which is handy when you forget all the MM.INFO choices etc.

There will probably be an update next week, bugs permitting.

Jim
VK7JH
MMedit   MMBasic Help
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5950
Posted: 02:15am 04 Oct 2023
Copy link to clipboard 
Print this post

MMEdit 5.2.1 has been uploaded to my website.
I have fixed a number of small niggling issues.
One big improvement is the XMODEM speed. It has gone from a dismal 3kB/s to ~20kB/sec
I might de able to get a bit more out of it in future updates.

The syntax files are now back to one file for keywords and parameters. They also now have a section for phrases.
This means that auto-completion can have a lot more options for you to choose.
If you don't like auto-completion, you have the option to turn it off.

The ~ character gets replaced with a space when it is inserted into your code.
This is handy when there are a number of sub commands and the memory is not as good as it was...

The syntax files will get a further update once the current round of MMBasic updates are finished and I have new manuals to work with.

I am hoping that a different system for keeping syntax files up-to-date works as well as I think it will.


Jim
VK7JH
MMedit   MMBasic Help
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5950
Posted: 04:02am 05 Oct 2023
Copy link to clipboard 
Print this post

The files were updated to include a small change to MMCC
cursor position save and restore escape sequences now functioning.
Version number remains the same.

Jim
VK7JH
MMedit   MMBasic Help
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 3701
Posted: 08:41pm 07 Oct 2023
Copy link to clipboard 
Print this post

Jim,

When I send a listing from a picomite to the editor (version 5.2.1) I loose the formatting. Both windows and Linux versions. The listing scrolling in the control center terminal screen looks well formatted.

Volhout
PicomiteVGA PETSCII ROBOTS
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5950
Posted: 09:01pm 07 Oct 2023
Copy link to clipboard 
Print this post

  Volhout said  Jim,

When I send a listing from a picomite to the editor (version 5.2.1) I loose the formatting. Both windows and Linux versions. The listing scrolling in the control center terminal screen looks well formatted.

Volhout


That's odd.
I don't see any problems here.

Indenting is retained. Keywords will display with whatever setting you have in MMEdit but will be the same as the pico in the file.

Are you using the pico editor to modify the code before sending it to MMEdit?

Jim
VK7JH
MMedit   MMBasic Help
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 3701
Posted: 09:47pm 07 Oct 2023
Copy link to clipboard 
Print this post

Hi Jim,
I tried cr, lf,crlf as terminators, but always loose leading tabs,
And empty lines are gone. Resulting in vwry compact code. ..

Volhout

Edited 2023-10-08 07:48 by Volhout
PicomiteVGA PETSCII ROBOTS
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5950
Posted: 09:08am 08 Oct 2023
Copy link to clipboard 
Print this post

If you are using this method:


The code is sent to the clipboard and then pasted into MMEdit
You can paste into any text editor to see if the formatting is intact.
That will tell me where the problem is. MMCC or MMEdit

Jim
VK7JH
MMedit   MMBasic Help
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 3701
Posted: 01:28pm 12 Oct 2023
Copy link to clipboard 
Print this post

Hi Jim,

Sorry for the late reply. I run Ubuntu 20.04 (same core as Mint 20.03).

1/ In direct answer to your question above. See below pictures. The listing on the MMCC screen is identical to the program as typed in the build in editor. When sending the listing to MMEdit, empty lines are lost. And (not visible in this listing) formatted comments on the same line as the command/function are loosing TAB's or <SPACE>'s between command and comment.

MMCC


MMEDIT

 

2/ In Linux: When using MMEdit and MMCC it is essential that MMEdit is STARTING the MMCC program. This is typically happening when opening MMEdit and sending the program to the mite. MMEdit starts MMCC, MMCC transfers the program to the mite.
The combination MMCC and MMEdit do not work in any other order. So when I start MMCC and want to send to the editor, MMCC does not open MMEdit.
When I open MMCC, realize I want to sent to the editor, and manually open MMEdit, then MMCC cannot find MMEdit to send the listing to.

Picture this: I have a (i.e. micro-)mite with build in program, and I want to update the program. The only way to use MMEdit/MMCC is opening MMEdit, and let it open MMCC. But I need to leave the program in the mite intact....

The work around is to use teraterm/putty, and grab the listing from the mite (LIST ALL), then <ctrl-A><ctrl-C>. Store than on the PC, then open the program in MMEdit.

3/ In Linux version 5.2.1: I have observed 2 times that with multiple tabs open, it happens when closing 1 tab, text is moved into another tab. Example: I have a tab open "untitled" with the default startup lines in them. I open a second program "test.bas", that ends up in a second tab "test". I have seen 2 times that when I close "test", that the program test moves to the tab "untitled". This happens during editing sessions that include multipe uploads to the mite, and copy paste actions. So it is not easy to reproduce this.

Jim...please understand..MMEdit is a terrific tool, and these observations do not prevent me in any way using it. If you can fix them... nice.

Volhout
PicomiteVGA PETSCII ROBOTS
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5950
Posted: 07:59pm 12 Oct 2023
Copy link to clipboard 
Print this post

I am having trouble seeing the issue here.

The problem when you close tabs was very much a problem with V5.2.0 but I thought it was fixed in 5.2.1
I have done some more work in that area so hopefully I have fixed it properly in 5.2.2 which I will try and send out in a day or two.

When you send from the micromite listing to the editor, a copy of the listing should be in your clipboard.

If you forget to open MMEdit before sending the listing, the copy will still be in the clipboard so you can then open the editor and a new tab then "paste" the listing. No need to go via another text editor.
Please try a "send listing to editor" and then open up your text editor and "paste" so we can see if the comment indenting is lost there.



In my image, I am using a WEBmite to connect with.
No lines or formatting are lost.
I also opened MMCC first, followed by MMEdit.

The issue might be related to a problem with TABs which I am working on. I have found that cause and nearly finished the code.
I also have a strange problem with highlighting user variables which has also been tracked down and the fix will be in the next release.

It might help if you send me a copy of MMEdit5.inf, just in case there is a setting I need to test.

Jim
VK7JH
MMedit   MMBasic Help
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5950
Posted: 07:27am 13 Oct 2023
Copy link to clipboard 
Print this post

I have posted an update to MMEdit - V 5.2.2
I recommend users of V5.2.0 and 5.2.1 upgrade.
There were far too many bugs in those versions.

I think I have squashed all known bugs although not sure about Volhouts problem.

User variables were highlighting strings as well under some circumstances.

TAB characters were causing grief. I do recommend sticking to space characters rather than TABs but TABs shouldn't upset things.

For the WEBmite, I now use my own inbuilt TFTP so there is no longer any need to configure an external program. I still need to work on the error messages.
Microsofts TFTP was saving files on the PC as read-only!

I keep fiddling with XMODEM resulting in yet more speed.

I will update the Help files when time permits.

Jim
VK7JH
MMedit   MMBasic Help
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 3701
Posted: 11:57am 13 Oct 2023
Copy link to clipboard 
Print this post

You site still states 5.2.1
5.2.2 is not yet available
PicomiteVGA PETSCII ROBOTS
 
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 1667
Posted: 12:49pm 13 Oct 2023
Copy link to clipboard 
Print this post

  Volhout said  You site still states 5.2.1
5.2.2 is not yet available

I'm still using v5.00 and like reports like error line number code.
If versions after v5.00 are buggy I'll wait for latest.
Without mmedit I'd never got to code picomite, it seems familiar to the 8bit pic editor  I used before on win.
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5950
Posted: 07:39pm 13 Oct 2023
Copy link to clipboard 
Print this post

That serves me right for rushing.
https://www.c-com.com.au/MMedit5.htm now points to the latest versions.

Sorry about that...

Jim
VK7JH
MMedit   MMBasic Help
 
     Page 1 of 7    
Print this page
© JAQ Software 2024