Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 12:11 20 May 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 : MM Edit V3.4.11

     Page 1 of 2    
Author Message
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5923
Posted: 10:10pm 29 May 2014
Copy link to clipboard 
Print this post

I have uploaded an update to MMEdit.

I have made a few changes to the way that portable copies of the program are made.

The only bug fix was to allow com ports greater than COM32.
You can now use ports up to COM64.

This wasn't a problem until the microMite came along and we are using multiple com ports.

I have also updated the syntax help files to MM Basic V4.5

The update can be download from the usual location
http://www.c-com.com.au/MMedit.htm

Pleas let me know if there are any errors in the syntax help (and any bugs)

Jim
VK7JH
MMedit   MMBasic Help
 
viscomjim
Guru

Joined: 08/01/2014
Location: United States
Posts: 925
Posted: 03:27am 30 May 2014
Copy link to clipboard 
Print this post

Hey Jim,

Wanted to thank you again for your efforts with MMedit. I use it everyday and now, playing with I2C more, I run two instances of MMedit on my laptop. That works well and it makes life a lot easier for sure!!!
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2794
Posted: 04:57am 30 May 2014
Copy link to clipboard 
Print this post

Thanks Jim - a big help for me regarding ports higher than COM32

Nice work . . . .

For everything Micromite visit micromite.org

Direct Email: whitewizzard@micromite.o
 
psergiu

Regular Member

Joined: 09/02/2013
Location: United States
Posts: 83
Posted: 05:51am 30 May 2014
Copy link to clipboard 
Print this post

This version works OK with CrossOver/Wine on OS X

One improvement suggestion:

When editing files with a .spr extension, use special syntax highlighting so you can see the colour of the sprites.

Ideally: light gray background, each number to have the background colour set as the represented colour, spaces to be displayed with a dark gray square (on the light gray background)

And if possible , instead of the line numbers on the left, to be shown a bar in the length of a sprite.

Example:

| 16,16
| 'my sprite
+| 02132456342324234
|| 23452345235442342
|| ....
|| 23542462437623564
+| 34865876482364823
| ' end of sprite
| ' sprite 2
+| 02132456342324234
|| 23452345235442342
...


Or you could use the line numbers to show the number of the sprite, and if possible, some notification if a certain sprite line is not the correct length

Example:

| 16,16
| 'my sprite
1| 0213245_342324234
1| 2345234_235442342
1| ....
*1| 2354246243762356
1| 34065076402341235
| ' end of sprite
| ' sprite 2
2| 02132456342324234
2| 23452345235442342
...


PS: Same idea (without the syntax highlighting) can be applied to .fnt files

Thanks
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5923
Posted: 02:31pm 30 May 2014
Copy link to clipboard 
Print this post

@WhiteWizzard
I thought you would be happy with the higher port numbers. The problem only appeared when you were selecting ports 'the correct way'. I was cheating a bit so I didn't see the problem here.

@psergiu

What you are asking for looks like 'code folding' which will be implemented in MMEdit2 but not in the current versions.

I have been thinking about another application for the Maximite.
I think we could do with an image editor which has easy conversion to maximite format built in.
I could also include aids for sprite creation/editing and the same for fonts although there is an existing application for sprites and fonts, available from Geoff's website.

http://geoffg.net/maximite.html

The last entry on the page.

Jim
VK7JH
MMedit   MMBasic Help
 
psergiu

Regular Member

Joined: 09/02/2013
Location: United States
Posts: 83
Posted: 08:23pm 30 May 2014
Copy link to clipboard 
Print this post

While using the File Master, most of the transfers from PC to Maximite are failing

"Failed to start" on the PC side
"Error: Remote did not respond" on the MM Side.

They sometimes work okay (rarely) when i change the connection speed to another value.

Transfers from Maximite to PC are always okay.

Also, "New Folder" on the PC side does not actually creates a new folder.

Also, when i try to use the "Load and Run current code" button, i get a small windows saying:

MaxiMite Version V0.0 detected
Sending Y:\Downloads\MAXIMITE\m\temp.bas
Blocks: 1

Then this goes away and on maximite i get:

> LOAD "temp.bas"
Error: Cannot find file

This happens both when i open a local .BAS file (not named temp.bas) or use File->New, and have a "untitled.bas" window, same error message, with the same path.

A file Y:\Downloads\MAXIMITE\m\temp.bas does get created, but there are no XMODEM commands being run on the maximite to actually send that file.

That dir is the one where i keep my current project and from where i opened my last .BAS file.

Edited by psergiu 2014-06-01
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5923
Posted: 09:08pm 30 May 2014
Copy link to clipboard 
Print this post

It definitely looks like there are problems with the communications.
The baud rate shouldn't matter with a maximite, it only has any effect with the micromite.

The file temp.bas is created from the text in the edit window. The XMODEM is then called. After the transfer is completed, the TEMP.BAS is deleted.

After the transfer, the maximite is told to RUN the file and because the transfer failed, there is no TEMP.BAS there to run.

I haven't changed the sending code for a few updates so I don't think it's a new problem.
I will try a few more time delays but without the problem occurring here, it could be difficult to fix. Difficult but not impossible.

I think I can see where the fail to create a new folder is occurring so that should be an easy fix.

Jim



VK7JH
MMedit   MMBasic Help
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5923
Posted: 11:41pm 30 May 2014
Copy link to clipboard 
Print this post

@psergiu

I just realised that you are using MMEdit on a Mac.
This probably explains the communication errors.
I will put a configurable delay in which should solve the problem.

I think I have fixed the creating new folders error.

Expect an update sometime tomorrow.

Jim
VK7JH
MMedit   MMBasic Help
 
psergiu

Regular Member

Joined: 09/02/2013
Location: United States
Posts: 83
Posted: 06:04am 31 May 2014
Copy link to clipboard 
Print this post

Try loading/saving files from a non-default drive and folder. Maybe somewhere you forget a line that makes the transfer module expecting files to always be in C: or a certain default directory.
 
G8JCF

Guru

Joined: 15/05/2014
Location: United Kingdom
Posts: 676
Posted: 08:14am 31 May 2014
Copy link to clipboard 
Print this post

Hi Jim

Thanks for all the effort you put into MMEdit, it works really great, and I use it for all my Micromite programming, life would be a lot tougher without MMEdit. For a Micromite, I would suggest that perhaps Geoff remove the "EDIT" code from the Micromite version to make more memory available for user programs, and people use MMEdit instead - MMedit is that good !

One new feature I would like to see in MMEdit is the ability to download a "stripped" version of the program to the target, ie just like the "Load and Run Current Code", but "Load & Run Stripped". By "Stripped" I mean remove all comments, blank lines, indents, unnecessary white space etc. I like to put in as many comments into the source as I can so that when I come back later for updates/fixes I can work out what was going on, and making liberal use of indents, blank lines and spaces for visual and structural clarity but downloading all that stuff to a Micromite needlessly wastes precious memory. I know I could achieve something similar by using the existing "Program " menu entries, but that means I would have to keep two versions of the source, increasing the potential for a mistake, and it would be so much faster development cycle if you could implement the "stripped" download.

Even better would be if you were to also replace all multi-character variables with single/short variables as well in the program download - although this extra step would make debugging a tad more difficult.

Once again, very, very many thanks for your efforts.

73

Peter (GM8JCF)
The only Konstant is Change
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5923
Posted: 02:34pm 31 May 2014
Copy link to clipboard 
Print this post

Peter,
Adding the option to load a stripped down version of the code is a VERY good idea.
I will add an option in the preferences to do that.

Replacing variables with short names would not save much program storage space on the maximite and as all variables are allocated 32 bytes for the name, there is no saving once the program is running. I don't think there would be any measurable speed improvement either.
I like meaningful names.
There is a program that runs on the maximite and possibly DOS MMBasic which does crunch the program by doing all the above and more. Useful when space is really tight.

Jim
VK7JH
MMedit   MMBasic Help
 
paceman
Guru

Joined: 07/10/2011
Location: Australia
Posts: 1329
Posted: 04:42pm 31 May 2014
Copy link to clipboard 
Print this post

  G8JCF said  One new feature I would like to see in MMEdit is the ability to download a "stripped" version of the program to the target, ie just like the "Load and Run Current Code", but "Load & Run Stripped". By "Stripped" I mean remove all comments, blank lines, indents, unnecessary white space etc.

Peter,
Jim's comment about the MMBasic program to do what you've suggested is called "Crunch" and is available in the MMBasic library on Geoff's website. I'm not sure if it would run on DOS MMBasic but if so might be what you need. Hugh Buckle (shoebuckle) wrote the program and he runs the MMBasic Library (on Geoff's website) for us. The relevant thread is here Crunch thread and the latest version is V2.3.

Greg
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5923
Posted: 05:21pm 31 May 2014
Copy link to clipboard 
Print this post

Another update for MM Edit to test.

If the bugs/issues addressed work, I will update the main program.
For now, extraxct the MMEdit.TKN file from the ZIP and replace the one in the program folder.
2014-06-01_030657_MMedit.zip

Creating a new folder on the PC should now work.

If you are having problems with the 'load and run ' command,
there is an option in the 'configure Maximite' panel called 'edit mode delay'.
This option now also has an effect on the time we wait for commands to respond when doing a 'load and run'. The default of 150ms should be sufficient (it was 30ms) but you can try increasing the value to 1000ms or more without causing any grief.
This is probably only needed for Mac and Linux users.

There is now an option to do a partial crunch before uploading the file during 'load and run'
This option is found under 'preferences'


There are now 3 options:
Set the time, run after loading and load a crunched version'

The copy of the program in the editor is not affected.

The crunch will remove indenting and any trailing spaces, remove blank lines and remove comments which use the '. Comments which use REM will not be removed.
It should be safe to use with programs that use line numbers with limited benefit.

One disadvantage with this method is when you program exits with an error. The line number reported will not be the same as the line number in the editor.


I will wait for a few reports before committing the update.

Jim

VK7JH
MMedit   MMBasic Help
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5923
Posted: 09:27pm 31 May 2014
Copy link to clipboard 
Print this post

I found a few more places where a timing change might be needed.
That's the only changes to this file so there is no need to use this on if you downloaded the version in the last post.
2014-06-01_072712_MMedit.zip

Jim

VK7JH
MMedit   MMBasic Help
 
psergiu

Regular Member

Joined: 09/02/2013
Location: United States
Posts: 83
Posted: 04:28am 01 Jun 2014
Copy link to clipboard 
Print this post

File upload to Maximite from the file manager now works great - with your default delay settings.

The "Load and run" button still does not, either with a existing .bas file or using File->New - The little windows that pops-up says "Maximite version 0.0 detected" very shortly (and sometimes a "Error talking to Maximite" afterwards) but does not attempts to upload "temp.bas" at all, there are no XMODEM commands sent to the Maximite. It just does a LOAD "temp.bas" or RUN "temp.bas" (depending on the new settings flags) which fails, as there's no temp.bas on the maximite.

I have tried increasing both "Line Delay" and "Edit Mode Delay" up to 450 - still not working
 
G8JCF

Guru

Joined: 15/05/2014
Location: United Kingdom
Posts: 676
Posted: 12:23pm 01 Jun 2014
Copy link to clipboard 
Print this post

Hi Jim

Looking forward to the Load "Crunched" and Run Option - thanks

Your comment re line numbers being off when an error occurs is very valid, so it would be really nice if the option to keep lines (but remove the content apart from CRLF) was an option in preferences, then when the programmer was really sure that the program was well debugged, they could then select the Crunch blank lines option for maximum compression.

From your comment re Variable names, does that mean that as the source is being loaded into Micromite, MMBasic tokenises the source on the fly including Variable names ? eg if I was to peek the Flash memory would I see ASCII text or a highly tokenised version ?

Please keep up the good work, it is very much apppreciated

Thank you

Peter - GM8JCF
The only Konstant is Change
 
G8JCF

Guru

Joined: 15/05/2014
Location: United Kingdom
Posts: 676
Posted: 12:35pm 01 Jun 2014
Copy link to clipboard 
Print this post

Hi Jim

I just tried out 2014-06-01_030657_MMedit.zip and selected Auto Crunch on load.

What a difference, Without AutoCrunch, Memory shows 16K, after Auto Crunch, 7K !!!!

Superb !! That was quick !

The preferences UI has a bug in that if one selects Auto Crunch on Load, then Save, then Exit, AutoCrunch is indeed in force. When one goes back to preferences, Auto Crunch check box shows unticked. Ticking and unticking the checkbox, then Save, then Exit does turn off Auto-Crunch.

Thank you

Peter - GM8JCF


The only Konstant is Change
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5923
Posted: 01:26pm 01 Jun 2014
Copy link to clipboard 
Print this post

@psergiu
If you are not getting a valid version number for MMBasic, the XMODEM no longer tries to send. "Maximite version 0.0 detected" should read "Maximite version V4.5 detected"
Can you fit a monitor to the maximite and see if the commands are getting that far.
the sequence is
^C
"PRINT MM.DEVICE$"
"print mm.ver"
if mm.ver is not valid then
exit with "Error talking to maximite"
else
XMODEM....
endif

you should see the commands and responses on the monitor.
If the maximite doesn't respond to the crtl C, either by design or in the case of the micromite - asleep, the transfer will fail.

It means that we still need more time to get a response from the maximite. I will do a few more changes and put in a few more tests to try and get to the bottom of it

@G8JCF
It looks like I have a small bug fix to do in the preferences area. Thanks for that.
Going from 16k to 7k with crunch is impressive. You must do a lot of commenting - a good practice.

Jim
Edited by TassyJim 2014-06-02
VK7JH
MMedit   MMBasic Help
 
bigmik

Guru

Joined: 20/06/2011
Location: Australia
Posts: 2870
Posted: 02:52pm 01 Jun 2014
Copy link to clipboard 
Print this post

Gday Jim,

Just a suggestion,

Everytime I go to load a program I am a bit confused by the SAVE and LOAD icons as they are a bit ambiguous, can you please change these to an open folder (no arrow or small arrow) and the 3" blue floppy icon as I feel this is unambiguous.

Regards,

Mick

PS. Thank you for the wonderful program that MMEdit has become, with the uMite is is invaluable.

Mik
Edited by bigmik 2014-06-03
Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<<
 
psergiu

Regular Member

Joined: 09/02/2013
Location: United States
Posts: 83
Posted: 07:49pm 01 Jun 2014
Copy link to clipboard 
Print this post

I always had the Maximite connected of a VGA Monitor.

I did some more tests and it looks like the Load and Run button works, but only if it's the first command to be run, and only 1st time:

- Test 1

Both timeout values set to 450.
Start MM Edit
it opens with the last opened .bas file already loaded
i push the "Load & Run"
On the Maximite screen i get:

PRINT MM.DEVICE$
print mm.ver
XMODEM RECEIVE "TEMP.BAS"
LOAD "temp.bas"

Small window shows version correctly, temp.bas is being sent
During XMODEM transfer, VGA screen flickers slightly indicating serial port activity

Success

- Test 2
Immediately after above test, i add a new empty line to the program, pushed the Load and Run button again.

On maximite:
PRINT MM.DEVICE$
print mm.ver
XMODEM RECEIVE "TEMP.BAS"

but on the PC side the transfer never starts. Maximite finally times out with "Error: Remote did not respond"
VGA screen only flickers for a bit at the beginning of the XMODEM transfer then it remains stable until i get the "Remote did not respond" error message

Failure

- Test 3

Reduced both timeouts to 150.
Stopped MM Edit, then started-it again
Redid tests 1 & 2 - exactly the same thing happens - first time successful, 2nd time timeout

- Test 4

Same as test 3, only with File->New and with a one-line "Hello World" program.
Same result: Success at the 1st "Load and Run", failure for the successive ones.

- Test 5

Stop & Start MM Edit
Open File Master
Transfered a file successfully from PC to maximite
I push the Load and Run button

The ONLY line that appears on Maximite is

LOAD "temp.bas"

The little window says "Maximite Version V0.0 detected" and "Error talking to maximite"
Further pushes of the Load and Run button - same result. Only a single LOAD "temp.bas" on the Maximite.

Exactly the error i was describing in my previous post
 
     Page 1 of 2    
Print this page
© JAQ Software 2024