![]() |
Forum Index : Microcontroller and PC projects : CMM2: V5.05.04 beta
![]() ![]() ![]() ![]() |
|||||
Author | Message | ||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10066 |
Oversight - will fix in next beta |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10066 |
Version 5.05.04b1h http://geoffg.net/Downloads/Maximite/CMM2_Beta.zip Bug fixes: Fixes page to read from after Ctrl-C Opens the editor on the last edited line after a skipped error rather than the error line New functionality: KEYDOWN(7) will give any modifier keys that are pressed. These keys do not add to the count in keydown(0) The return value is a bitmask as follows: lalt ? 1 lctrl ? 2 lgui ? 4 lshift ? 8 ralt ? 16 rctrl ? 32 rgui ? 64 rshift ? 128 KEYDOWN(8) will give the current status of the lock keys. These keys do not add to the count in keydown(0) The return value is a bitmask as follows: caps_lock ? 1 num_lock ? 2 scroll_lock ? 4 OPTION PATH renamed to "OPTION SEARCH PATH" e.g. OPTION SEARCH PATH "/zmim/" MM.INFO$(SEARCH PATH) will return the string OPTION LIST modified to match OPTION COLOURCODE REVERSE. This will be the same as OPTION COLORCODE OFF except that the text will be in reverse video black on white. This will apply to the filemanager and editor |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10066 |
Version 5.05.04b1h http://geoffg.net/Downloads/Maximite/CMM2_Beta.zip New permanent OPTION: OPTION EDIT FONT LARGE or OPTION EDIT FONT NORMAL When LARGE is selected this changes the font used in the editor and file manager to FONT 2. This reduces the editor to 30 lines of 66 characters but makes it much more readable on small screens or with "older" eyes. The serial terminal is resized to fit. The screen returns to the normal font when exiting the editor or filemanager Of course the CMM2 supports sideways scrolling of the screen in the editor so using the larger font does not restrict program line length. The new option works as expected with OPTION COLOURCODE OFF and OPTION COLOURCODE REVERSE ![]() ![]() Edited 2020-06-28 03:02 by matherp |
||||
panky![]() Guru ![]() Joined: 02/10/2012 Location: AustraliaPosts: 1111 |
If I execute the command MODE 3,12,rgb(blue) I end up with a blue background with white text in 320 x 200 as expected. If I now enter IMAGE SAVE "junk1" the image saved is an 320 x 200 image (without the blue background and status line) but on completion, the display is back to MODE 1 800 x 600. Question: Does image save always save in the current mode (resolution) or should it save the screen actually on display (and merge whatever pages are set into a single image)? Edit: Running 5.05.04b1k on a Waveshare CMM2 Edited 2020-06-28 11:51 by panky ... almost all of the Maximites, the MicromMites, the MM Extremes, the ArmMites, the PicoMite and loving it! |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10066 |
IMAGE SAVE is not a command, it will generate an error which changes the mode back to mode 1,8 SAVE IMAGE saves the page currently being written to which is page 0 by default. It does not have the capability to merge multiple pages and the background in 12-bit modes. To do this would need a huge amount of code to try an mimic the transparency H/W in the processor in S/W - sorry. |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10066 |
Version 5.05.04b1p http://geoffg.net/Downloads/Maximite/CMM2_Beta.zip Bug fixes: Closes serial ports when entering the editor to avoid corruption New Functionality: IMAGE ROTATE_FAST and IMAGE_RESIZE_FAST both have a new optional parameter - dontcopyblack IMAGE RESIZE x, y, width, height, new_x, new_y, new_width, new_height [,page_number] [,dontcopyblack] IMAGE ROTATE x, y, width, height, new_x, new_y, angle! [,page_number] [,dontcopyblack] This defaults to 0, i.e. black pixels are treated like any other. If it is set to 1 then any black pixels in the created image will not be written. New subcommands for the PAGE command: PAGE AND_PIXELS sourcepage1, sourcepage2, destinationpage PAGE OR_PIXELS sourcepage1, sourcepage2, destinationpage PAGE XOR_PIXELS sourcepage1, sourcepage2, destinationpage These combine the pixels on sourcepage1 and sourcepage2 by ANDing, ORing, or XORing them. destinationpage can be the same as either of the sourcepages if required. e.g. mode 3,16 load jpg "tiger-320" pause 1000 page write 1 cls box 50,50,220,100,,rgb(white),rgb(white) timer=0 PAGE AND_PIXELSs 0,1,0 print timer do:loop This loads the image to page 0, the view page as normal. Then a white box is drawn on page 1. The PAGE command then ANDs page 1 and page 0 and replaces page 0 with the result. The effect is to use the white box to window the original image. Of course this example is simplistic but I'm sure Mauro, amongst others of you, will find innovative uses ![]() |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6219 |
INSERT key not working from USB keyboard. Works OK for PC terminal. Jim VK7JH MMedit |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10066 |
Version 5.05.04b1r http://geoffg.net/Downloads/Maximite/CMM2_Beta.zip Bug fixes: Fix bug when using full path with include files FIX bug using USB insert key Breaking Changes WS2812 renamed BITBANG WS2812 FONT 4 replaced with 10x16 font OPTION EDIT FONT expanded, new values are now SMALL(133x60), NORMAL(100x50, default), MEDIUM(80x37), LARGE(66,30) New subcommand: BITBANG BITSTREAM pinno, n_transitions, array() This command is used to generate an extremely accurate bit sequence on the pin specified. The pin must have previously been set up as an output and set to the required starting level. The array contains the length of each level in the bitstream in microseconds. The maximum period allowed is 65.5 mSec The first transition will occur immediately on executing the command. The last period in the array is ignored other than defining the time before control returns to the program or command line. The pin is left in the starting state if the number of transitions is even and the opposite state if the number of transitions is odd For example: dim a%(9)=(1,2,3,4,5,6,7,8,9,10) setpin 3,dout bitbang bitstream 3,10,a%() ![]() Edited 2020-06-30 03:27 by matherp |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6219 |
For those of us who have used the BITBANG cfunction on the MX170, I say thank you. Jim VK7JH MMedit |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4251 |
Hi Peter, I think you've left some debugging code in there, see this transcript starting with a Waveshare reset: > Colour Maximite 2 MMBasic Version 5.05.04b1r Copyright 2011-2020 Geoff Graham Copyright 2016-2020 Peter Mather > list "one.bas" Print "one" #Include "two.inc" > list "two.inc" Print "foo" Print "two" > > run "one.bas" /two.inc <--- nothing in the code is printing this one foo two > Regards, Tom MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4251 |
And for good measure in "two.inc" delete the trailing quote from Print "foo and run the test again: > Colour Maximite 2 MMBasic Version 5.05.04b1r Copyright 2011-2020 Geoff Graham Copyright 2016-2020 Peter Mather > list "one.bas" Print "one" #Include "two.inc" > list "two.inc" Print "foo Print "two" > > run "one.bas" /two.inc Error: No closing quote > run "one.bas" /two.inc Error: Memory write address 1. As previously mentioned it would be appreciated if "Error: No closing quote" told us the offending file and line. 2. I'm assuming the "Error: Memory write address" on the second attempt is an old fashioned bug. Regards, Tom MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4251 |
And something else for you, again starting with a Waveshare reset: > Colour Maximite 2 MMBasic Version 5.05.04b1r Copyright 2011-2020 Geoff Graham Copyright 2016-2020 Peter Mather > list "test.bas" Print Mm.CmdLine$ > > run "test.bas", Moses supposes his toeses are roses Moses supposes his toeses are roses > > *test > *test Moses Moses > > *test Moses supposes Error: No closing quote As far as I'm aware there is no quote that can be unclosed ? And that's me done for the evening, Tom Edited 2020-06-30 08:23 by thwill MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10066 |
Diagnostic removed in latest post + fonts rationalised (thanks Jim). Can't look at anything else for 2-3 days Looking to add BITBANG SPI and BITBANG SERIAL to the command in a future release |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6219 |
Version 5.05.04b1s OPTION EDIT FONT MEDIUM works as expected but causes the options to be reset on next boot. Other font sizes are OK. Work around while Peter has his well earned break: Don't set MEDIUM or if you do, change it back to one of the other sizes before shutting down. Jim VK7JH MMedit |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10066 |
Version 5.05.04b2a http://geoffg.net/Downloads/Maximite/CMM2_Beta.zip fix bug that caused OPTION EDIT FONT MEDIUM to be lost BREAKING CHANGES: OPTION SD TIMING now defaults to the slower setting. New settings are OPTION SD TIMING NORMAL and OPTION SD TIMING FAST New command: EXECUTE command$ This executes the Basic command "command$". This is experimental and may not make the final release and comes with a serious health warning. You will probably find many ways of locking up the system using this requiring a power cycle. The command is not recommended in high performance programming as it has to tokenize the command before executing it. Things that are tested and work OK include RUN, GOSUB, Subroutine calls, other simple statements (like Print and simple assignments) Statements separated by : are not allowed and will error The GOTO statement will not work properly The command sets a "screw up timer" before executing the requested command and if control does not return to the command, like in a goto statement, the timer will expire. In this case you will get the message "Command timeout". RUN is a special case and will cancel the timer. This allows full programmatic selection of another program to run including passing a command line. e.g. ![]() Edited 2020-07-03 00:14 by matherp |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4251 |
Nice, I think. Kind of like an EVAL for arbitary statements? Does this replace the previous change allowing the cmdline of RUN to be specified using a string expression, which doesn't seem to have worked out that well. Regards, Tom MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4251 |
Peter, Whilst you were away it had occurred to me that perhaps what we needed was a variant of RUN looking something like: RUN STRING filename$, commandline$ which indicates the filename and command-line came from string expressions. I don't believe you would need an equivalent for * since that is only used at the command-line making the need to use expressions non-existent (I think?) Obviously the EXECUTE command makes this suggestion superflous and I offer it only in the event you decide that EXECUTE is too dangerous to make the cut as I presume RUN STRING would be less intrusive - I may be wrong in that regard. Yours truly, Tom Edited 2020-07-03 02:20 by thwill MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
GregZone Senior Member ![]() Joined: 22/05/2020 Location: New ZealandPosts: 114 |
Thanks for this Peter. I do believe this is the most sensible approach, and should reduce new user SD Card compatibility issues. ![]() |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10066 |
Version 5.05.04b2b http://geoffg.net/Downloads/Maximite/CMM2_Beta.zip fixed bug when playing mono WAV files BREAKING CHANGES FROM V5.05.03 Removed PLAY SPEECH, it didn't work anyway so obviously no-one had used it New Functionality MATH command and function New optional parameter for PLAY MODFILE fname$ [,samplerate] The sample rate is the number of samples per second that the modfile engine generates. The default is 44100. Processor overhead is reduced by decreasing this. Valid values are 8000, 16000, 22050, 44100, 48000 Note: wav files played using PLAY EFFECT during mod file playback must have the same sample rate as the modfile output. Trying to play a wav file with a diffent sample rate will generate an error. Wav files played with PLAY EFFECT can now be mono or stereo. |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4251 |
Good morning Peter, I don't think it was in the manual ![]() Was this distinct from TTS ? and does TTS provide a mechanism to produce speech through the audio jack (is that what "on the DAC outputs" means) ? I ask because a simple to use "speak to me" function is a good way for small children to achieve quick, enjoyable results. Neat. On a matter of procedure should we be reporting bugs we find when running 5.05.04 beta in this thread, or in the "CMM2: V5.05.03 Bug Reports" thread ? Thanks again, Tom MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
![]() ![]() ![]() ![]() |
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |