![]() |
Forum Index : Microcontroller and PC projects : CMM2: Next steps?
![]() ![]() ![]() ![]() |
|||||
Author | Message | ||||
damos Regular Member ![]() Joined: 15/04/2016 Location: AustraliaPosts: 74 |
I am currently experimenting with creating a synthesizer using CMM2. It is easy enough to add amplitude modulation by varying the output level. To get it nice the best time is to adjust at the end of the period, otherwise you get glitches. For 500Hz this is trivial as you just wait for 2ms then update the amplitude. This isn't going to work for any frequencies that have a period that is a non-integral multiple of 1ms. Now that we have all this power, it would be nice to have higher resolution timers. 0.1ms would be good, and something even small would be awesome. I know they add a bit of overhead, but in applications like this is pretty much the only thing running. This applies to Pause and SetTick instructions. The other thing that would be nice is the equivalent of an arbitrary function generator. There is support for a few waveforms, but it would be nice to be able to supply out own data and have the current functions play our waveforms. FM could be done by adjusting the frequency after each period, but ideally you could so it in the middle. This means that the oscillator allows you to change the frequency but it does not reset the phase to 0. So if we are at 90 degrees on a 500Hz output and the frequency changes to 501Hz, it maintains the 90 degrees and continues playing as if it was 501 all along. |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6266 |
PAUSE will take fractions. begin = timer pause 1 print timer - begin ' begin = timer pause 0.1 print timer - begin DAC will let you produce arbitrary waveforms. Just fill an array with whatever you require. Jim VK7JH MMedit |
||||
abraxas Regular Member ![]() Joined: 16/06/2020 Location: CanadaPosts: 99 |
Can we please, please, pretty please have a light mode option (white background, dark text) in the code editor? My middle aged astigmatism riddled eyes are suffering :( Thanks in advance if at all possible. Better yet a way to customize one's colors for the built in MMBasic editor. |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10192 |
I will implement 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 - hope this is a good enough compromise for you. |
||||
Poppy![]() Guru ![]() Joined: 25/07/2019 Location: GermanyPosts: 486 |
Just a general question. The CMM1 came up in 2012 and now 2020 we have the CMM2 complete[d]ly outdating and therefore magnificently superseding its precursor. How long do you think the CMM2 as it is will be the running standard assuming that there is no CMM3 based on probably different architecture being considered yet? A little comparison would be the C64 (CMM2) next to the AMIGA (CMM4/5/6 ...), both were well-established next to each other (and in this issue the CMM1 would just be anything else of less and in comparison unimportant quality, like a C20 or Plus 4, so just for exclusive specialists and historians). And not to forget that it all largely depends on 2 persons ... being not the youngest ones (just like all of us ![]() By the way the Monochrome MaxiMite or easier to get and to use the DuinoMite are still valid for being a very constructive link between the MicroMite and the Standalone "Desktop Coding and Game Machine" CMM2 or any follower .... and hopefully not ignored concerning BASIC-updates. ![]() ![]() | ||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4301 |
Good morning, I made this request on the "wrong" thread so I thought I'd have another go with some explanation to try and persuade you of its merit. Can we please have the ability to programatically read the value of OPTIONs, specifically PATH ? - Alternatively is the value somewhere I can PEEK it, and if so could you let me know where ? With the addition of the * command, the PATH option and the ability to pass the $MM.CMDLINE from one program to another - THANKS FOR ALL OF THESE, we're at the point where standard utility programs can be developed in BASIC, shared around and used by all almost as easily as the MMBasic/firmware commands. I would now like to be able to write one of these utilities to facilitate the "installation" of other utilites. This would be called "utility.bas" and would be installed in the PATH directory - I'm open to other suggestions as to its name. USAGE *utility add "zmim" "/zmim/src/zmim.bas" Generates a file "zmim.bas" in the PATH with the following contents: ' Autogenerated by "utility" command. s$ = Mm.CmdLine$ Run "/zmim/src/zmim.bas", s$ *utility remove "zmim" Removes a file "zmim.bas" from the PATH - probably only works on those created by "add" by checking the file for the 'Autogenerated comment. *utility list Lists files in the PATH and for those that were created with "add" specifies which file they link to. e.g. cat -> /tools/cat.bas foo -> UNMANAGED gauntlet -> /games/mauro/gauntlet/gauntlet.bas grep -> /tools/grep.bas zmim -> /zmim/src/zmim.bas I am aware that in this case I could use MM.INFO$(CURRENT) within "utility.bas", but that's less robust as it relies on the specific case where the program that wants to know the PATH is itself in the PATH directory. Regards, Tom Edited 2020-06-26 20:04 by thwill MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10192 |
OK. The change will be as follows: OPTION renamed to "SEARCH PATH" e.g. OPTION SEARCH PATH "/zmim/" MM.INFO$(SEARCH PATH) will return the string OPTION LIST modified to match |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4301 |
Thanks Peter, then it will be over to me. Aside: as far as *I* am concerned your enhancements in this area seem to obviate the need for the LS alias to LIST FILES as it could be replaced by an "ls.bas" or "cat.bas" in the SEARCH PATH instead. So if LS was using up one of your precious command slots you could consider its removal. I'm not sure what other users think? Tom MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
CircuitGizmos![]() Guru ![]() Joined: 08/09/2011 Location: United StatesPosts: 1427 |
Doesn't MAP do this? Or is that reset? Could a selected MAP be used as OPTION COLOURCODE MAP Hmmm. Maybe I misunderstand MAP. Micromites and Maximites! - Beginning Maximite |
||||
abraxas Regular Member ![]() Joined: 16/06/2020 Location: CanadaPosts: 99 |
I will implement 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 - hope this is a good enough compromise for you. Thank you so much, Peter. |
||||
Turbo46![]() Guru ![]() Joined: 24/12/2017 Location: AustraliaPosts: 1638 |
Please no. Bill Keep safe. Live long and prosper. |
||||
Turbo46![]() Guru ![]() Joined: 24/12/2017 Location: AustraliaPosts: 1638 |
Someone queried about a mouse but I think there was no response. I would like to have one (a serial mouse) but not at the permanent cost of a serial COM port. Perhaps another OPTION? OPTION COMnbr MOUSE ON|OFF or OPTION MOUSE COMnbr ON|OFF the COM port parameters could be set in the usual way I suppose that would need another function to return the pointer location though. or maybe: MM.INFO(MHPOS) MM.INFO(MVPOS) Bill PS I am aware of TassyJim's efforts using a PS2 mouse and Arduino and have used the Silicon Chip USB to serial mouse adaptor myself. Raros started it years ago with a real serial mouse. Edited 2020-06-27 17:00 by Turbo46 Keep safe. Live long and prosper. |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10192 |
To do this in a generic fashion comes into the "too hard" category but I've been thinking about this one and have a fun answer Try the simple program below. You can substitute the LOAD JPG with any output you want clipped. mode 3,12 page write 1 cls rgb(black,15) 'set the page to solid black text mm.hres\2,0,"A tiger in a circle",CT circle mm.hres\2,mm.vres\2,90,,,rgb(black),rgb(black) ' draw a circle in transparent black page write 0 load jpg "tiger-320" do:loop I'm also thinking about implementing a chroma-keyed BLIT which could allow some interesting effects ![]() |
||||
Geoffg![]() Guru ![]() Joined: 06/06/2011 Location: AustraliaPosts: 3282 |
That is an impossible question to answer (as I expect everyone realises). But a bit of background on the evolution of the Maximite might help. The monochrome Maximite started off as an experiment and a demo of what the PIC32 chip could do. The fact that this little computer became so popular startled everyone (including me). I think that it was so popular because it was both simple (easy to build and easy to use) and capable (VGA output and a competent BASIC). The Colour Maximite was an evolution of this and that was driven simply by using a chip with more pins that allowed it to generate three colour streams (RGB) and have more I/O. While I was at it I added a bunch of features that people had been asking for (sound, RTC, etc). After this I made a few attempts to create a successor using the PIC32MZ and PIC32DA chips (the latter had a built in video controller). They never got off the ground because of the difficulty of using Microchip's development environment (Harmony) and the fact that these chips came in impossible to solder huge surface mount packages. The CMM2 came about because Peter Mather spotted the Waveshare module and realised that with a simple motherboard it would make a great computer in the Maximite style. Added to that Peter had already ported MMBasic to the STM32 family of chips and further adding into the mix his considerable energy and effort resulted in the CMM2. It has taken a lot of time and effort required to reach the CMM2 by people working in their spare time. I guess that I have put in a solid 12 months on the Maximite, Micromite and MMBasic. Peter put in at least 6 months on the CMM2 alone and that does not count the effort he did in previously porting MMBasic to the STM32. There were also many others who were involved in testing, advice, etc. Because of the huge amount of work involved there will not be a CMM3 anytime soon. My guess that the CMM2 will be improved and polished over time but it will require a whole new family of chips with much better performance and features to justify developing a replacement for the CMM2. It would also require someone to come up with the bright idea and run with it. Geoff Geoff Graham - http://geoffg.net |
||||
Poppy![]() Guru ![]() Joined: 25/07/2019 Location: GermanyPosts: 486 |
Thanks Geoff for this detailed reply. ![]() A practical thought I have is about merging the CMM2 and the Micromites somehow. Nothing concrete yet, but what about making the CMM2 a complete Standalone that can parallelly run and program Micromites, so that no PC (except for initial flashing) is needed? So there also needs to be some breakout board or adapter connected to the GPIO´s with a socket for the chip and its own pinouts ... ![]() ![]() | ||||
JohnS Guru ![]() Joined: 18/11/2011 Location: United KingdomPosts: 4033 |
Although a CMM2 could program Micromites, is it really worth the effort when a PC costs almost nothing (for those who don't have one) - or it's easy to use a Raspberry Pi. You don't need Windows, in case that's an issue. Any CMM3, assuming it would be a biggish step up, is probably years away but maybe Allwinner chips would be suitable, such as the T2. Tons of work and the CMM2 is hardly EOL(*)! (*) end of line John |
||||
Poppy![]() Guru ![]() Joined: 25/07/2019 Location: GermanyPosts: 486 |
Thanks for questioning, John. I am not sure about the HowTo and if it´s worth the efforts needed to. I even cannot guess what efforts it will take and if anyone else could find it useful. Following this line we do not need any MaxiMite at all, a PC can do all of it or just a RPi as well. My idea is that a fusion could close the circle around the whole MM-Family just reminding me of old times programming and burning Eproms with the C64. The very interesting thing about the CMM2 are its capabilities now being really a standalone device and therefore taking it as a really autonomous basis for anything else. So if there is a peripheric extension being supported by the OS or any included editor or whatever then this will even practically outpace the Duinomite. Just my theoretical thoughts ... ![]() ![]() | ||||
robert.rozee Guru ![]() Joined: 31/12/2012 Location: New ZealandPosts: 2428 |
1. merging the CMM2 and the Micromites somehow [...] 2. I am not sure about the HowTo [of a CMM2 programming a PIC32] [...] 3. My idea is that a fusion could close the circle around the whole MM-Family [...] 1. this has already happened: - MaxiMite basic (for the MX595) is descended from [ed: inspired by?] bwBasic (that itself was modelled on microsoft's GWbasic, by Mrs Verda Spell, or so the legend goes). - MicroMite Basic (for the MX170, then MX470, PIC32MZ, RPi, et al) is descended from MaxiMite basic. - the CMM2 uses an H7 processor, running the SAME core interpreter as the MX170 etc. hence CMM2 basic is fundamentally the same as MicroMite basic. i believe the CMM2 has a level of compatibility added in, by Peter, to handle of some of the older CMM syntax and functionality. 2. it is not really feasible. i wrote the portion of pic32prog that most of us currently use to program a PIC32 over an 'asciiICSP' interface (which is what the 'microbridge' implements). pic32prog is about as compact as any PIC32 programming software is likely to get, and yet would consume a very major chunk of the flash memory resources of the CMM2 if added into flash. quite simply, programming a PIC32 is not easy. it is fiddly, messy, and causes most your hair to fall out! 3. you'll still need an internet-connected computer to download the firmware you wish to burn to the PIC32 from geoff's website. why not use the same computer to program your PIC32 micromite? i guess that if someone was really keen, they could set up a low-end RPi to automatically (headlessly) pick up the latest hex file from geoff's website, and use pic32prog (that will compile and run on the RPi) to program it into a MX170 (etc) that is plugged into a ZIF socket mounted on a RPi tophat. if someone wants to create a version 3 of the CMM, just take a RPi and port MicroMite basic to run on the bare metal... ![]() cheers, rob :-) Edited 2020-06-28 00:35 by robert.rozee |
||||
JohnS Guru ![]() Joined: 18/11/2011 Location: United KingdomPosts: 4033 |
![]() The closed hardware, need for NDA etc, make this problematic, to put it mildly. John |
||||
JohnS Guru ![]() Joined: 18/11/2011 Location: United KingdomPosts: 4033 |
2. I am not sure about the HowTo [of a CMM2 programming a PIC32] [...] 2. it is not really feasible. I see it as not too painful but with a likely user count close to zero. John |
||||
![]() ![]() ![]() ![]() |
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |