Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 05:47 02 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 : CMM2: How to extend the BASIC library?

     Page 2 of 2    
Author Message
MauroXavier
Guru

Joined: 06/03/2016
Location: Brazil
Posts: 303
Posted: 12:55pm 18 Sep 2020
Copy link to clipboard 
Print this post

  lizby said  Ok, now we're talking crazy. What would a MMBasic CSUB 8080/Z80+8086 emulator look like on the CMM2?

Now I'll just crawl back under my rock.

CP/M running on the CMM2 would be awesome.
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4044
Posted: 12:58pm 18 Sep 2020
Copy link to clipboard 
Print this post

  lizby said  Ok, now we're talking crazy. What would a MMBasic CSUB 8080/Z80+8086 emulator look like on the CMM2?

Quite cool I think.  (If rather pointless & weird.)

With a "BIOS" (for BDOS/etc) as well?

IIRC, CP/M (aka CP/M-80) only used the 8080 instruction set, which is quite small...

John
Edited 2020-09-18 23:00 by JohnS
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3378
Posted: 02:10pm 18 Sep 2020
Copy link to clipboard 
Print this post

Z80+CP/M emulator with C source.
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
Womble

Senior Member

Joined: 09/07/2020
Location: United Kingdom
Posts: 267
Posted: 02:21pm 18 Sep 2020
Copy link to clipboard 
Print this post

  jpusztai said  Feels like a DOSBOX kinda weekend coming up :)

In case anybody is having difficulty setting this up, here is a quick tutorial for Windows10x64, and some helpful links  

1. Install DOSBox

2. Make a folder somewhere for your virtual HDD.  eg. C:\DOSAPPS  Within DOSBox this will become your C: drive

3. Edit your C:\Users\Womble\AppData\Local\DOSBox\dosbox-0.74-3.conf file located in the hidden AppData folder in your user profile (obviously change Womble to your UserName).  I usually create a shortcut on the desktop to open this file in notepad, its plain ascii text.

4. Add the following at the end of the file.  Should be fairly explanitory.
[autoexec]
# Lines in this section will be run at startup.
# You can put your MOUNT lines here.
MOUNT C C:\DOSAPPS
PATH=Z:\;C:\;C:\DOSUTIL;

# Examples for mounting CD ISO's for games
#
# IMGMOUNT G C:\GAMES\PCDOS.iso -t iso
IMGMOUNT g: "C:\DATA\Digital Games\Warcraft2\warcraft2_roy.cue" -t iso

CALL SETTINGS.BAT

This mounts your virtual HDD folder, any cdrom images (in the example, I am loading a .bin .cue image of my Warcraft2 cd rom) you may need for software, sets up the DOS path and finally calls a batch file SETTINGS.BAT to finish configuring the DOS environment.

Note DOSBox always has a Z: drive, where the built in default utilities like MOUNT are located.  Also the # symbol in dosbox-0.74-3.conf comments out lines.

5. Create SETTINGS.BAT in the root of the virtual HDD folder, here is mine:
set path=z:\;c:\;c:\dosutil;c:\dosutil\dgedit\;
set editor=c:\dosutil\dgedit\
set list=c:\dosutil
c:

If your application install disks modify AUTOEXEC.BAT to setup the environment, this is where you copy those DOS commands.

6. Create any directories you may need for software, remember Dos 8.3 format names.  I usually have a folder called DOSUTIL in which I place QBASIC.EXE QBASIC.HLP and QBASIC.INI along with Vernon Buerg's excellent LIST utility and any editors, etc.

7. You can copy files to the virtual HDD folder from windows, or run the installation files from within DOSBox.  This article explains how to mount floppy disk images in case you do not have a real FDD

The DOSBox documentation is here and the WiKi

Another guide can be found here it is for Windows7, but the method is the same.

Modem support and IPX networking is available for old games, refer to the WiKi.  DOSBox also supports SoundBlaster and MIDI, it was after all designed for running games  

Oh, and ALT-TAB toggles the DOSBox window to Full Screen.

Have fun.    

Womble
 
Sasquatch

Guru

Joined: 08/05/2020
Location: United States
Posts: 377
Posted: 04:47pm 18 Sep 2020
Copy link to clipboard 
Print this post

So here is a wild and crazy Idea:

MMBasic on the CMM2 is out of tokens for Commands and Functions.

Just about everything in a MMBasic program could be represented by a 16-bit (2Byte) token.  

The first 4 bits (1..16) would encode the token type something like this:

1 Command
2 Function
3 Int literal
4 Int constant
5 Int variable
6 Float literal
7 Float constant
8 Float variable
9 String literal
10 String constant
11 String variable
12 User Subroutine
13 User Function
14-16 ...

The remaining 12 bits (1..4096) would be an index into the table for the token(s) of that type.

This leaves tons of room for future features.

This would take a bit of time for the tokenizer when the program is first run.  After that execution should be super fast.

This would be a major overhaul to the core of MMBasic.  But with the way Commands and Functions are tokenized now, MMBasic is already half way there?
Edited 2020-09-19 02:49 by Sasquatch
-Carl
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10315
Posted: 05:04pm 18 Sep 2020
Copy link to clipboard 
Print this post

  Quote  This would be a major overhaul to the core of MMBasic.


No: This would be a re-write to something that isn't MMBasic, wouldn't be adopted by Geoff or me, and would destroy the stability of the core language and piss off all the users (now into the thousands) who want to use the software rather than keep changing it.
 
William33
Newbie

Joined: 27/07/2020
Location: Germany
Posts: 9
Posted: 07:29pm 18 Sep 2020
Copy link to clipboard 
Print this post

  jpusztai said  
  William33 said  Sorry, but would it useful without a mouse?


Those old TUIs were designed to work without a mouse.

You either tabbed or arrowed around until you reached the target widget, or you used a shortcut key - note in the first screenshot every screen item has a unique letter in red or yellow, which is the keystroke associated with it.

Typical Windows BIOS configuration screens are an artifact of this keyboard-only UI method.


Yes, they can work without a mouse. As far as I remember using the Turbo Pascal Editor with a mouse was way more comfortable. This was called "Turbo Vision" and still works with Free Pascal. The windows are draggable which isn't possible with just the keyboard.


 
gevik

Newbie

Joined: 04/07/2020
Location: Netherlands
Posts: 10
Posted: 08:10pm 18 Sep 2020
Copy link to clipboard 
Print this post

Unfortunately we won't be getting mouse support on the machine, But I think it would be possible to come up with a key combination that enables moving windows around.
 
Sasquatch

Guru

Joined: 08/05/2020
Location: United States
Posts: 377
Posted: 08:47pm 18 Sep 2020
Copy link to clipboard 
Print this post

  matherp said  

No: This would be a re-write to something that isn't MMBasic, wouldn't be adopted by Geoff or me, and would destroy the stability of the core language and piss off all the users (now into the thousands) who want to use the software rather than keep changing it.


1.  I prefaced the post by saying it was a Wild and Crazy idea.

2.  I didn't suggest it would be simple, quick or easy.

3.  Never say Never!  Now that development on the CMM2 is winding down, "Someone" might undertake something like this, and if "Someone" could demonstrate that it works, it might be worth pursuing by the community.

4.  And just to be clear: Nobody should release any code, source, or executable based in any part on MMBasic Source Code without full participation and consent of the original authors!
Edited 2020-09-19 08:22 by Sasquatch
-Carl
 
RetroJoe

Senior Member

Joined: 06/08/2020
Location: Canada
Posts: 290
Posted: 11:26pm 18 Sep 2020
Copy link to clipboard 
Print this post

  Womble said   Oh, and ALT-TAB toggles the DOSBox window to Full Screen.


It's actually ALT-ENTER.

The week-end is upon us!

It's hard to believe all the stone-age UI crap we had to live through to arrive at modern GUIs. Anyone who whines about "Mac versus Windows" should be forced to use this thing for a couple of hours !!

I say that with the utmost respect for all the innovators who got us here. Once upon a time, these TUIs were the pinnacle of user interface design!


Edited 2020-09-19 09:29 by jpusztai
Enjoy Every Sandwich / Joe P.
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2642
Posted: 08:41am 21 Sep 2020
Copy link to clipboard 
Print this post

Problems running DOS programs. in Win10 - try using Win95 compatibility mode.
It works for many but not all.
 
William33
Newbie

Joined: 27/07/2020
Location: Germany
Posts: 9
Posted: 08:52am 21 Sep 2020
Copy link to clipboard 
Print this post

  phil99 said  Problems running DOS programs. in Win10 - try using Win95 compatibility mode.
It works for many but not all.


Better use DOSBox  - it works like a charm.
 
Nimue

Guru

Joined: 06/08/2020
Location: United Kingdom
Posts: 420
Posted: 10:08am 21 Sep 2020
Copy link to clipboard 
Print this post

  MauroXavier said  
  lizby said  Ok, now we're talking crazy. What would a MMBasic CSUB 8080/Z80+8086 emulator look like on the CMM2?

Now I'll just crawl back under my rock.

CP/M running on the CMM2 would be awesome.


Next:  "Will it run Crysis".......
Entropy is not what it used to be
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4311
Posted: 10:11am 21 Sep 2020
Copy link to clipboard 
Print this post

  Nimue said  Next:  "Will it run Crysis".......


Of course it will, but typing it in and debugging it will cripple you for life.

Tom
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
JoOngle
Regular Member

Joined: 25/07/2020
Location: Sweden
Posts: 82
Posted: 02:39pm 21 Sep 2020
Copy link to clipboard 
Print this post

  matherp said  
  Quote  This would be a major overhaul to the core of MMBasic.


No: This would be a re-write to something that isn't MMBasic, wouldn't be adopted by Geoff or me, and would destroy the stability of the core language and piss off all the users (now into the thousands) who want to use the software rather than keep changing it.


Agree completely with Peter on this one...

...However, that said - what Wouldn't piss users off , would be an entirely NEW CMM2 language (on an entirely separate BIOS that doesn't run alongside CMM2, but you have to choose between the two) - would be an entirely new OS, or Basic or C or ASM or both if you have skills, however - don't expect Peter to code it for you :)

I've been dabbling in those thoughts myself, because I am very "games" oriented, so Blitz basic from Amiga is very close to my heart, and as it is now - Blitz basic's nature isn't close to MMBasics philosophy. I see MMBasic as a bit of a "jack-of-all-trades" that can essentially do it all, but limited in many ways when it comes to game specific features.

I've even had thoughts about a new ARM processor that is of the same type used in mobile phones that has the MALI 400-450 3D processor on it, it's Open GL compliant and would extend the gaming capabilities tremendously on a CMM version.

Imagine hardware sprites (that essentially are 3D polygons) where you can even map entire screens (think text or graphics terminals) onto the polygons itself.

A language where you can tell the sprites to go-from go-to a position just by move sprite 1, x,y,z to x1,y1,z1, size, mode, loop    etc.
Same with backgrounds
bitmap 1, x,y,z to x1,y1,z1, size, mode, loop etc.
bitmap 2, ....   (with layer priorities), essentially these are just polygons with memory mapped textures.

These chips are dirt cheap today, and it's very tempting to go that route. But oh the time, clock has only 24 hours in a day, wish we had 200 per day :D

But one can dream, no one is stopping anyone from making their own "whateverbasic" on the CMM2.
 
     Page 2 of 2    
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