![]() |
Forum Index : Microcontroller and PC projects : CMM2: V5.05.04 beta
Page 1 of 5 ![]() ![]() |
|||||
Author | Message | ||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10066 |
In this thread I'll update the changes to the CMM2 firmware as I develop the beta for V5.05.04. Note: some of the changes will be experimental and may not make it to the eventual release and syntax may also change however there will be no (intentional) changes that affect the operation of a program written to the manual under 5.05.03 First new version is V5.05.04b1b http://geoffg.net/Downloads/Maximite/CMM2_Beta.zip Changes as follows: Bug fixes: Fixed bug in GPS function when run from the command line Fixed bug where graphics commands that were completely off-screen left a line Existing files without an extension can now be edited. The editor will still default to appending ".BAS" if the file does not exist. If you need a new file without an extension create it with an extension of ".tmp" and then rename it. The keyboard auto-repeat rate is automatically scaled when in the editor if the screen is scrolled. This will stop multiple keypresses stacking up when the screen can't keep up. Better picture review in the filemanager Pressing return on any picture file in the filemanager will switch to 800x600x16bit mode (mode 1,16) and display the picture as before. However, now pressing any key when the picture is displayed will return to the filemanager with everything left as before the picture was displayed. New IMAGE subcommands IMAGE ROTATE_FAST IMAGE RESIZE_FAST these commands have exactly the same syntax as the originals but use a nearest neighbour algorithm rather than bi-linear interpolation. As a result they are much faster (6x for rotate and 20x for resize) but, of course, the resulting image quality will not be as good OPTION F11 and F12 restricted to 23 characters BITMAP command removed as per the manual OPTION PATH pathname$ This defines a path which will be searched when you use the existing RUN command or the new shortform RUN command if the file does not exist in the current directory RUN filename$ command will search path When you type RUN with a filename it will first look for the file in the current working directory and then any path specified by OPTION PATH. As before the filename must be a quoted string literal. Any text after a comma following the filename will be passed to the program in MM.CMDLINE$ Shortform run command at the command prompt An asterix before a filename will be interpreted as the RUN command. The filename is not quoted and any text after a space following the filename will be passed to the program as MM.CMDLINE$. The command will check for the existence of the file in the current directory and run it from there if found. If the file is not found the command will also search in any path defined by the OPTION PATH command. The shortform run command is not available in a program Edited 2020-06-24 20:51 by matherp |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4251 |
<appreciative bow> Woot! Woot! ![]() Still don't know why we need to have PATH configurable though, I'd prefer longer F11/F12 strings. Is there any way the following could be made to work? This is the last step in the puzzle as it allows commands in the PATH to redirect to real implementations elsewhere: one.bas: Print MM.CMDLINE$ Run "two.bas", MM.CMDLINE$ two.bas: Print MM.CMDLINE$ What happens: > *one foo foo ¯'|2 What I would like to happen: > *one foo foo foo Thank you, Tom Edited 2020-06-24 21:03 by thwill MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10066 |
Because not everyone thinks file layouts should be determinate like the Unix wonks ![]() Nearly, you will have to copy MM.CMDLINE$ but otherwise yes : watch this space Print MM.CMDLINE$ d$=MM.CMDLINE$ Run "two.bas", D$ |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4251 |
I could argue, but it doesn't seem fruitful. Nearly, you will have to copy MM.CMDLINE$ but otherwise yes : watch this space Print MM.CMDLINE$ d$=MM.CMDLINE$ Run "two.bas", D$ Great. <bows again> MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
JohnS Guru ![]() Joined: 18/11/2011 Location: United KingdomPosts: 3998 |
Because not everyone thinks file layouts should be determinate like the Unix wonks ![]() It's not determinate in UNIX so that's an odd quote :) Or a new meaning of determinate? BTW I like the changes. Good enough. (Tweaking the RUN command used within a program sounds sane, if it's easy enough to do.) John |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10066 |
Version 5.05.04b1c posted http://geoffg.net/Downloads/Maximite/CMM2_Beta.zip Fixed case matching bug in EVAL when user functions were called RUN command can now take a string variable as the text for MM.CMDLINE$ so the following are all valid: RUN "filename",string$ 'runs filename, will append .bas if not included in the string literal RUN string$ 'runs the current program RUN "filename", any text required RUN any text required Note: as specified in the manual, when a filename is used it must be a string literal and cannot be a variable |
||||
KeepIS![]() Guru ![]() Joined: 13/10/2014 Location: AustraliaPosts: 1828 |
The shortform Run cmd and option path are really nice additions ![]() NANO Inverter: Full download - Only Hex Ver 8.1Ks |
||||
KeepIS![]() Guru ![]() Joined: 13/10/2014 Location: AustraliaPosts: 1828 |
This will stop multiple keypresses stacking up when the screen can't keep up. I like the idea but something does not feel right. Once I scroll off the current page, up or down, the key repeat rate drops to what feels like one line a second. With OPTION KEYBOARD REPEAT 600,50 I never had key stacking and everything moved / stopped perfectly. Now if I want to scroll off the current page, say go down 10 lines of code, I have to rapidly press the DN key, or wait for what seems like 10 seconds for 10 lines to scroll. Using page UP/DN does not overcome the problem as the cursor now has to bought up or down the page again, but at least it's normal when moving on the current page. Is it just me ![]() ![]() NANO Inverter: Full download - Only Hex Ver 8.1Ks |
||||
abraxas Regular Member ![]() Joined: 16/06/2020 Location: CanadaPosts: 99 |
Is it just me ![]() ![]() Yeah, not just you. I have the exact same problem. Just muscle taught myself to hit pgUp pgDown whenever the line of interest is not my viewport. Hardly ideal. |
||||
KeepIS![]() Guru ![]() Joined: 13/10/2014 Location: AustraliaPosts: 1828 |
Just noticed there is no key-repeat with page UP or DN. I hadn't noticed that before, but it may have already been like that? In any case, is this the intended operation? I feel that the Key-repeat modification would be more applicable to Page scrolling, with single line scrolling left untouched. . . Edited 2020-06-25 14:13 by KeepIS NANO Inverter: Full download - Only Hex Ver 8.1Ks |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10066 |
The rate currently drops to the greater of repeat start (600 in your case) and 250mSec. Was intended to be greater of repeat rate (50 in your case) and 250mSec. Will fix in the next beta. Also I think I can drop the 250 to 175 and that will tune the repeat rate to the maximum the screen can update at. |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4251 |
so the following are all valid: RUN "filename",string$ 'runs filename, will append .bas if not included in the string literal RUN string$ 'runs the current program RUN "filename", any text required RUN any text required Note: as specified in the manual, when a filename is used it must be a string literal and cannot be a variable Just checking, not offering opinion either way, but is it correct that: RUN "myprogram.bas", foo Reports: Error: foo is not declared Is this an (un)intentional change of behaviour (caused by my earlier request) to RUN which as documented in the manual suggests that everything after the , is passed through to MM.CMDLINE$ without interpretation. Regards, Tom MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10066 |
Check you are running b1c downloaded from above link. Works for me both at the command line and in a program. |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4251 |
Check you are running b1c downloaded from above link. Works for me both at the command line and in a program. Right you are, it turns out the issue is more complex. I had just ERRORed out of a program that used "Option Explicit On" ... Try this, I started with a reset, and "myprogram.bas" does not exist: > Colour Maximite 2 MMBasic Version 5.05.04b1c Copyright 2011-2020 Geoff Graham Copyright 2016-2020 Peter Mather > New > Option Explicit On > RUN "myprogram.bas", foo Error: foo is not declared > Option Explicit Off > RUN "myprogram.bas", foo Error: foo is not declared > New > RUN "myprogram.bas", foo Error: Could not find the file Regards, Tom MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10066 |
Easily fixed will be in the next beta |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4251 |
Easily fixed will be in the next beta Great ... and another ... Is this correct behaviour: > Colour Maximite 2 MMBasic Version 5.05.04b1c Copyright 2011-2020 Geoff Graham Copyright 2016-2020 Peter Mather > new > run "myprogram.bas", foo bar Error: Expression syntax It appears the <cmdline> can't have spaces in it unless the whole thing is quoted? Best regards, Tom MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10066 |
Possibly the same issue, doesn't do it in my corrected program unless you have got into another "special" condition before the test |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4251 |
Possibly the same issue, doesn't do it in my corrected program unless you have got into another "special" condition before the test Great, will test when we get that next beta, no rush. I thought I'd posted this in the last hour, but it appears to have been swallowed by the forum ![]() Can we programatically read the value of OPTIONs, specifically PATH .. I'm even happy to PEEK if you tell me where to look? Also YMMV but perhaps a tweak to the output of OPTION LIST might make it more pleasant, from: OPTION DISPLAY 50,100 OPTION USBKEYBOARD UK CURRENT VGA mode 800x600 RGB332 OPTION F11 chdir "A:/zmim/src" OPTION F12 chdir "/cmm/mmpp" OPTION PATH /bin/ to something like: OPTION DISPLAY 50,100 OPTION USBKEYBOARD UK CURRENT VGA mode 800x600 RGB332 OPTION F11 chdir "A:/zmim/src" <CRLF> OPTION F12 chdir "/cmm/mmpp" <CRLF> OPTION PATH /bin/ And perhaps "CURRENT VGA mode" shouldn't be interleaved but either fixed at the top or bottom. Regards, Tom MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10066 |
V5.05.04b1e http://geoffg.net/Downloads/Maximite/CMM2_Beta.zip Tidy up of OPTION LIST Avoid issue with OPTION EXPLICIT being specified when using RUN with a text commandline Change auto repeat scaling in editor to impriove performance Implemented support for $GN messages as well as $GP in the GPS background processor BREAKING CHANGES FFT replaced by MATH FFT otherwise syntax the same TTS replaced by PLAY TTS otherwise syntax the same |
||||
KeepIS![]() Guru ![]() Joined: 13/10/2014 Location: AustraliaPosts: 1828 |
Found an issue that's been there for a while. Run a program that sets page write to a page >0. In this case the Demo audio frequency analyser posted by Peter (matherp) which sets page write 1 and copies to page 0. Exit (ctrl-c) and run another program that gets a section of screen memory and displays it: Greatly simplified code below from my program: Mode 1,8 cls BOX 1,1,400,300,1,Colours(ct),colours(ct) Save IMAGE "T1.bmp",1,1,400,300 Load BMP "T1.bmp",1,1 The result: The Box is displayed on screen. The screen section is saved to a file. The reloaded image is from the previous program. Unless I set Page Write 0 or some other action changes Page Write to 0, the second program will not work as expected. Since some programs only exit with a ctrl-c, they can't reset graphics. File manage resets Mode but not Page. Should every program set page writes as well as mode on start? or is this action an oversight (bug?). NANO Inverter: Full download - Only Hex Ver 8.1Ks |
||||
Page 1 of 5 ![]() ![]() |
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |