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 : CMM2: V5.05.05 beta
Page 5 of 7 | |||||
Author | Message | ||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 3841 |
Yep, works with hard-coded labels and is documented to work with line numbers. Though it is present now I think was missing from earlier versions of the manual and I only noticed its existence after Jim used it in the "Life" implementation. I think it is even a relatively standard BASIC feature. Regards, Tom Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
Turbo46 Guru Joined: 24/12/2017 Location: AustraliaPosts: 1593 |
From Jim's version of 'Life': If this is what you are talking about - yes it works. Bill Keep safe. Live long and prosper. |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 8582 |
CMM2 V5.05.05b19 posted http://geoffg.net/Downloads/Maximite/CMM2_Beta.zip This is a big change and rolls in changes from the experimental thread and the sprite thread. NB: this release includes a re-arrangement of the OPTION structure so all options will be lost and will need re-entering. Bug fixes: Update to FR keyboard mapping Update to DE keyboard mapping Bugs in EXECUTE command , RUN with A: and RESTORE Bug using font 7 with scale <> 1 Screen formatting error in OPTION STATUS ON when cursor is on last line Screen formatting errors when programs end using non-default fonts when cursor is on last line New functionality: New modes 7 = 320x240 8 = 640x480 9 = 1024x768 (NB: 12-bit colour depth not available in this mode) New Option: OPTION DEFAULT MODE n n can be 1, 8, or 9. This permanent option sets the video mode for the command prompt, the editor and the filemanager and is the default mode when a program is run Remember you can also use OPTION EDIT FONT to adjust the font used in the filemanager and the editor New SPRITE sub-commands: SPRITE HIDE ALL Hides all the sprites allowing the background to be manipulated. The following commands cannot be used when all sprites are hidden: SPRITE SHOW (SAFE) SPRITE HIDE (SAFE, ALL) SPRITE SWAP SPRITE MOVE SPRITE SCROLLR SPRITE SCROLL SPRITE RESTORE Restores all the sprites. NB that any position changes previously requested using SPRITE NEXT will be actioned by the RESTORE and collision detection will be run SPRITE HIDE SAFE n Hides a sprite but automatically compensates for any other sprites that overlap it. This allows you to safely hide a sprite that is partially obscured but is obviously less performant than using the simple HIDE command SPRITE SHOW SAFE n, x, y, layer[, orientation] [,ontop] Shows a sprite and automatically compensates for any other sprites that overlap it. If the sprite is not already being displayed the command acts exactly the same as SPRITE SHOW. If the sprite is already shown it is moved and remains in its relative position relative to other sprites based on the order of writing. i.e. if sprite 1 was written before sprite 2 and it is moved to overlap sprite 2 it will display under sprite 2. If the optional "ontop" parameter is set to 1 then the sprite moved will become the newest sprite and will sit on top of any other sprite it overlaps. box 0,0,50,50,4,rgb(red),rgb(white) box 0,50,50,50,4,rgb(green),rgb(yellow) sprite read 1,0,0,50,50 sprite read 2,0,50,50,50 sprite copy 2,3,1 sprite show 1, 150,150,1 sprite show 2, 170,170,1 sprite show 3,210,210,1 pause 2000 sprite show safe 1,180,180,1,,1 pause 2000 sprite show safe 2,190,190,1 pause 2000 sprite show safe 1,200,200,1 pause 2000 sprite hide safe 3 do loop Edited 2020-08-23 07:39 by matherp |
||||
Andrew_G Guru Joined: 18/10/2016 Location: AustraliaPosts: 840 |
G'day, With version CMM2 5.05.05b19, if I run this "program": CLS: MODE 9,16: BOX 2,2,1020,760,,RGB(GREEN) I get a blank screen, a ">" prompt and the status line at the bottom. If I run the same from the prompt or in Jim's MMEdit chat window I get the green box as expected. Is it me or my monitor? Cheers, Andrew (PS my monitor is connected via VGA and normally runs at 1366x768 but happily switches to 800x600 etc. I've also tried setting it to 1024x768 to no avail). |
||||
bigmik Guru Joined: 20/06/2011 Location: AustraliaPosts: 2870 |
Andrew, Try this CLS: MODE 9,16: BOX 2,2,1020,760,,RGB(GREEN) PAUSE 5000 Kind Regards Mick Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<< |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 5905 |
When you 'RUN' the program from the editor or RUN, the mode gets switched back to whatever your default is (800 for me) When you run in immediate mode, the display mode stays where you put it, allowing the green box to be seen. Jim VK7JH MMedit  MMBasic Help |
||||
IanS Newbie Joined: 26/07/2020 Location: GermanyPosts: 19 |
ouch, with version 19 my German keyboard no longer works correctly. The standard keys (letters and numbers) are ok but for example the key that normally produces minus and underline now does nothing and the key which should be full stop and colon now produces the minus sign and underscore. Cursor movement keys for example left cursor now cause a down cursor. I'll go back to the last version for a while. Ians |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 8582 |
Ians Please download b19 again. I made a mistake copying the change that was requested and lost a line which offset all the keys by 1. Thanks to your excellent description it was easy to find and hopefully fix |
||||
IanS Newbie Joined: 26/07/2020 Location: GermanyPosts: 19 |
re-downloaded and problem fixed the German keyboard now works as it should, many thanks for the quick fix. Ian |
||||
Andrew_G Guru Joined: 18/10/2016 Location: AustraliaPosts: 840 |
Mick, Thanks. Yes that works, as does the MODE command followed by a BIG pause (5000) then the rest of the code. So its NOT my monitor. Jim, I was reading the FM but not Peter's note above "OPTION DEFAULT MODE n" solves the problem. Thanks both, Andrew Edited 2020-08-23 20:18 by Andrew_G |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 8582 |
You don't need a delay just stop the program returning to the command prompt CLS: MODE 9,16: BOX 2,2,1020,760,,RGB(GREEN) text mm.hres\2,mm.vres\2,str$(MM.HRES),CM do:loop Edited 2020-08-23 22:15 by matherp |
||||
vegipete Guru Joined: 29/01/2013 Location: CanadaPosts: 1082 |
If you type the following, the CMM2 hangs: p = MM.INFO(WRITE PAGE) page write p A nonsense command but still. Related, could we have a MM.INFO(PAGE) that reports the currently active write page? Or is there already a way to do this? For example, an ISR could use this info. ================== I notice that the MAP SET command is quite slow. Is that because it waits until the next vertical blanking? If so, could an optional parameter be implemented, [I, B or D], as seen in other popular commands such as PAGE COPY? (The PAGE AND/OR/XOR_PIXELS commands would also benefit from [I,B or D].) Visit Vegipete's *Mite Library for cool programs. |
||||
panky Guru Joined: 02/10/2012 Location: AustraliaPosts: 1094 |
MM.INFO(WRITE PAGE) returns a memory address whereas PAGE WRITE expects a page number or defaults to page 0 if no number assigned. The program snippet will try to set the page to some huge number (and as could be expected, go off into lala land) - perhaps PAGE WRITE could check the MAX PAGES info and default or error if a PAGE WRITE attempts to go beyond MAX PAGES? ... almost all of the Maximites, the MicromMites, the MM Extremes, the ArmMites, the PicoMite and loving it! |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 5905 |
dim integer mp,p,n page write 4 mp = MM.INFO(MAX PAGES) for n = 0 to mp p = MM.INFO(PAGE ADDRESS n) if p = MM.INFO(WRITE PAGE) then currentpage = n next n page write 0 print "Max pages = ";mp print "current page = ";currentpage print "At address: ";p I am sure that I saw somewhere how much memory each page uses for each mode so a simple maths routine will get it without having to test all pages like my example does. Jim VK7JH MMedit  MMBasic Help |
||||
vegipete Guru Joined: 29/01/2013 Location: CanadaPosts: 1082 |
I said it was a nonsense command. PAGE WRITE does give an error for 'sensible' wrong page numbers. For example, you get the following in MODE 1,8: > page write 10 Error: Maximum page number for this mode is 6 > On page 0, MM.INFO(WRITE PAGE) has the value 603979776 (or 6.03979776e+08 when assigned to a variable.) This value hangs the system, so something is amiss. Visit Vegipete's *Mite Library for cool programs. |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 8582 |
Will fix in the next beta page write 6 p=0 do while mm.info(write page)<>mm.info(page address p) p=p+1 loop print p |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 8582 |
CMM2 V5.05.05b20 posted http://geoffg.net/Downloads/Maximite/CMM2_Beta.zip Fixes bug caused when entering the editor with files left open from a previous run of the program Fixes bug in error trapping in PAGE WRITE command Improves timekeeping of RTC when processor is reset Edited 2020-08-25 01:44 by matherp |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 5905 |
The download from Geoff's site is still beta19 dated 23th August. Could you reload it please. Jim VK7JH MMedit  MMBasic Help |
||||
goc30 Guru Joined: 12/04/2017 Location: FrancePosts: 425 |
Hi if I change "mode" from 1 to 9 (option list confirm mode 9), and use "Files", screen return to "mode 1" |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 5905 |
IF you change to mode 9 with MODE 9 it will change back to mode 1 after FILES command but if you set the option as default OPTION DEFAULT MODE 9 it will return to mode 9 after the FILES command. Which firmware version are you using? Jim VK7JH MMedit  MMBasic Help |
||||
Page 5 of 7 |
Print this page |