Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 09:01 01 Aug 2025 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 : Possibly Heretical But....

Author Message
elk1984

Senior Member

Joined: 11/07/2020
Location: United Kingdom
Posts: 228
Posted: 12:38pm 17 Apr 2021
Copy link to clipboard 
Print this post

Is there an emulator out there for the CMM2?  Way beyond my capability but....

I've recently got back into the BBC Micro, and having a VS Code toolchain that runs code up on BeebEm so it can be got to the point of running on native hardware is pretty cool....
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4044
Posted: 01:32pm 17 Apr 2021
Copy link to clipboard 
Print this post

It's got vastly more hardware features and is far far faster than a BBC micro, so don't expect an emulator.

For coding in MMBasic, you can use the existing PC version(s).

John
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3378
Posted: 01:42pm 17 Apr 2021
Copy link to clipboard 
Print this post

  elk1984 said  Is there an emulator out there for the CMM2?

Not even sure exactly what the point would be. You don't need a separate keyboard and VGA monitor--you can plug a VGA-to-HDMI converter into the CMM2, and a HDMI-to-USB3 module into that, and run CMM2 programs from your PC (laptop) and view the output with Windows Camera (or other USB3 video capture programs).
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
toml_12953
Guru

Joined: 13/02/2015
Location: United States
Posts: 442
Posted: 02:27pm 17 Apr 2021
Copy link to clipboard 
Print this post

  lizby said  
  elk1984 said  Is there an emulator out there for the CMM2?

Not even sure exactly what the point would be.


One reason might be to be able to cut and paste code from web pages right into the emulator.
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3378
Posted: 02:39pm 17 Apr 2021
Copy link to clipboard 
Print this post

  toml_12953 said  
  lizby said  
  elk1984 said  Is there an emulator out there for the CMM2?

Not even sure exactly what the point would be.


One reason might be to be able to cut and paste code from web pages right into the emulator.

Cut, paste into notepad, save, then on the CMM2, XMODEM R "filename". That might take a few seconds longer--but compared to how many months of effort to build an emulator?

Or F5, type "filename.bas", paste, F1 to save or F2 to save and run (if you can find a file on a web page that you can directly run on the CMM2).
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
elk1984

Senior Member

Joined: 11/07/2020
Location: United Kingdom
Posts: 228
Posted: 03:31pm 17 Apr 2021
Copy link to clipboard 
Print this post

Don't get me wrong, I'm a big fan of the CMM2 (in fact I've just ordered my third!) and totally appreciate the amount of love and effort that goes into the ecosystem around it.  

My use case might be an edge case and think I've got a reasonable setup turn on my CMM2 and get coding; but I still find too often I'm pulling out SD cards, or Zmodeming files across (and removing the padding) and other things which are possible but just a bit more painful than they could be.  Unless I'm the only person who finds this a pain in the backside?

The thing that got me thinking was on a recent meet up of BBC fans who are still coding, I asked did people develop on the hardware and was mostly met with "why would you want to do that when there's more modern IDEs, better toolchain intergration etc."

  lizby said  Not even sure exactly what the point would be.

Just a few would be:
* A wider range of IDEs - the existing ones are good, but still need to move code around on SD Card / Zmodem.
* Integration with source control (see above portability of files)
* Not having to carry the hardware around - if I want to code away from my office (where my CMM lives quite happily) then my options are more limited - remote desktop onto OBS etc.

  lizby said  You don't need a separate keyboard and VGA monitor

Which is the pretty capable (but not perfect) setup I use in my office, but only because I can plug in a real keyboard.  No remote / remote capture options I've found so far support KEYDOWN for example.

  toml_12953 said  One reason might be to be able to cut and paste code from web pages right into the emulator.

I'm not quite that lazy

  JohnS said  It's got vastly more hardware features and is far far faster than a BBC micro, so don't expect an emulator.

True, but it doesn't have more features or is quicker than the x86 laptop I'd be running it on.
Edited 2021-04-18 01:36 by elk1984
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7937
Posted: 03:48pm 17 Apr 2021
Copy link to clipboard 
Print this post

It might be nicer to emulate the BBC on the CMM2. It takes up a lot less desk space. :)
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
elk1984

Senior Member

Joined: 11/07/2020
Location: United Kingdom
Posts: 228
Posted: 03:51pm 17 Apr 2021
Copy link to clipboard 
Print this post

  Mixtel90 said  It might be nicer to emulate the BBC on the CMM2. It takes up a lot less desk space. :)

Heh. It certainly does.
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3378
Posted: 03:56pm 17 Apr 2021
Copy link to clipboard 
Print this post

  elk1984 said  
  lizby said  Not even sure exactly what the point would be.

Just a few would be:
* A wider range of IDEs - the existing ones are good, but still need to move code around on SD Card / Zmodem.
* Integration with source control (see above portability of files)
* Not having to carry the hardware around - if I want to code away from my office (where my CMM lives quite happily) then my options are more limited - remote desktop onto OBS etc.

Re "integration", what's wrong with (in your preferred editor), ctrl+A,ctrl+C, (in TeraTerm, etc.) F5, type filename, right-click,F2?
Not having to carry around hardware seems to me a valid wishlist item, but how many months of effort by whom would be expected to have this provided?

  elk1984 said  
  lizby said  You don't need a separate keyboard and VGA monitor

Which is the pretty capable (but not perfect) setup I use in my office, but only because I can plug in a real keyboard.  No remote / remote capture options I've found so far support KEYDOWN for example.

Another valid point I think. I'm working on a _KEYDOWN function which would replace/enhance KEYDOWN and provide similar functionality with console (PC) keyoard except for real multikey situations (other than Ctrl+ or Alt+)--how many of those "real" multikey situations are there?

~
Edited 2021-04-18 01:58 by lizby
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4044
Posted: 04:01pm 17 Apr 2021
Copy link to clipboard 
Print this post

  elk1984 said  
  JohnS said  It's got vastly more hardware features and is far far faster than a BBC micro, so don't expect an emulator.

True, but it doesn't have more features or is quicker than the x86 laptop I'd be running it on.

But it does mean that writing an emulator would be a MUCH bigger task than doing a BBC micro one.  Also, the speed impact would be vastly bigger.

John
 
elk1984

Senior Member

Joined: 11/07/2020
Location: United Kingdom
Posts: 228
Posted: 04:07pm 17 Apr 2021
Copy link to clipboard 
Print this post

  JohnS said  But it does mean that writing an emulator would be a MUCH bigger task than doing a BBC micro one.  Also, the speed impact would be vastly bigger.

True. It was a long shot in case anyone far more capable than me had a part finished / in development one lying around.
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4044
Posted: 04:32pm 17 Apr 2021
Copy link to clipboard 
Print this post

  elk1984 said  
  JohnS said  But it does mean that writing an emulator would be a MUCH bigger task than doing a BBC micro one.  Also, the speed impact would be vastly bigger.

True. It was a long shot in case anyone far more capable than me had a part finished / in development one lying around.

Maybe there's one for the STM32 which you could extend?

I'd not like to guess how many solid months it might take to add the extra features.

John
 
vegipete

Guru

Joined: 29/01/2013
Location: Canada
Posts: 1132
Posted: 04:42pm 17 Apr 2021
Copy link to clipboard 
Print this post

I would think that CMM2 like graphics in the DOS version of MMBasic would get you most of the way there.
(Easy for me to say...   )
Visit Vegipete's *Mite Library for cool programs.
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3378
Posted: 04:56pm 17 Apr 2021
Copy link to clipboard 
Print this post

  vegipete said  I would think that CMM2 like graphics in the DOS version of MMBasic would get you most of the way there.
(Easy for me to say...   )

I'd just like to see MM+, MMX, F4 graphics in MMBasic DOS.

(Re "Easy", wot 'e said.)

~
Edited 2021-04-18 02:57 by lizby
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 09:48pm 17 Apr 2021
Copy link to clipboard 
Print this post

I started playing with this a couple of years ago.
I started with sound and a few primitive graphic commands then I got sidetracked with the CMM2 - much more interesting and useful.

The biggest problem is maintaining compatibility, we have enough different versions to keep track of as it is.

My preference is to program with a Windows/Linux based Basic for Windows/Linux stuff and MMBasic for the 'mites.
Otherwise we are likely to end up with a jack-of-all-trades, master-of-none.

I do most of my 'mite development on the PC with either my own editor or Notepad++, usually a combination of both.

Depending on the device, there are a number of solutions for transferring code and support files onto the device without the need to swap SDcards.

Jim
VK7JH
MMedit
 
Cyber

Senior Member

Joined: 13/01/2019
Location: Ukraine
Posts: 161
Posted: 03:25am 22 Apr 2021
Copy link to clipboard 
Print this post

  TassyJim said  I do most of my 'mite development on the PC with either my own editor or Notepad++, usually a combination of both.

By "my own editor" you mean MMEdit?
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 03:48am 22 Apr 2021
Copy link to clipboard 
Print this post

  Cyber said  
  TassyJim said  I do most of my 'mite development on the PC with either my own editor or Notepad++, usually a combination of both.

By "my own editor" you mean MMEdit?

Yes
VK7JH
MMedit
 
Cyber

Senior Member

Joined: 13/01/2019
Location: Ukraine
Posts: 161
Posted: 10:58am 22 Apr 2021
Copy link to clipboard 
Print this post

I think currently MMEdit is the best solution for all tasks desecribed above, except "not having to carry the hardware around". MMEdit provides nice and convenient environment, and instant tranfer & run code on any 'mite device.
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3378
Posted: 12:11pm 22 Apr 2021
Copy link to clipboard 
Print this post

  elk1984 said  
  lizby said  You don't need a separate keyboard and VGA monitor

Which is the pretty capable (but not perfect) setup I use in my office, but only because I can plug in a real keyboard.  No remote / remote capture options I've found so far support KEYDOWN for example.


Here's my solution so far for the KEYDOWN issue. Replace all KEYDOWN with _KEYDOWN and use this FUNCTION _KEYDOWN:


Function _keydown(i) ' replace keydown with inkey$
' note: doesn't catch multi-key strikes other than Ctrl, Alt
 Local ky$,iky%
 iky%=0
 If kbdFlag Then
   ky$=Inkey$ ' try console (PC) keyboard buffer
   If ky$<>"" Then
     iky%=Asc(UCase$(ky$))
     If iky%=27 Then ' escape sequence for arrows, functkeys
       ky$=Inkey$
       If ky$="[" Then ' escape sequence, maybe arrow, function key
         ky$=Inkey$
         If ky$="A" Then: iky%=128 ' up arrow
         ElseIf ky$="B" Then: iky%=129' down arrow
         ElseIf ky$="C" Then: iky%=131 ' right arrow
         ElseIf ky$="D" Then:     iky%=130' left arrow
         ' Function keys are ???
         EndIf
       EndIf
     Else ' normal key
'        _keydown=iky%
     EndIf
   EndIf
 Else ' use keydown
   If ik=7 Then
     _keydown=keydown(7)
     Exit Function
   EndIf
  ' keydown may have key(s)
   If keydown(0)>1 Then ' handle only first key
     iky%=keydown(1)
     ' for Ctrl+ key, subtract 64 (0x40)
     If (keydown(7) AND 34)>0 Then
       If iky% > 64 AND iky% < 91 Then ' upper case letter
         iky%=iky%-64 ' lctrl|rctrl
       ElseIf iky% > 97 AND iky% < 123 Then ' lower case letter
         iky%=iky%-97 ' lctrl|rctrl
       EndIf
     EndIf
   Else ' if necessary, handle keys 2-6
   EndIf
 EndIf
 _keydown=iky%
'  if iky%<>0 then ?iky%;" ";ky$;" ";
End Function ' keydown replacement

It's not complete, but it is functional, and it also works for porting CMM2 code to other micromites (F4 for example).

It may need enhancement for some KEYDOWN functions--it does not at present support ALT+ and doesn't catch multi-key strikes other than Ctrl+.

One thought for users--try to map multi-key strikes to a single value, perhaps a CTRL+ value.
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025