MMBASIC ported to Pi Pico

This is where we discuss our modern PCs, Raspberry Pis, Macs, and smart-whatevers.
TomXP411
Posts: 1731
Joined: Tue May 19, 2020 8:49 pm

MMBASIC ported to Pi Pico

Post by TomXP411 »



On 12/10/2021 at 3:31 AM, Tatwi said:




Being as objective, honest, and thoughtful as possible, I am 100% certain that I would actually use a Colour Maximite 2 more than a Commander X16, because being able to do cool stuff with "just BASIC" is all I really want from a retro computer. Along those lines, I think the VGAMite is the perfect system to power a modern PET (or 70s terminal or Fallout) inspired computer, because it would look amazing when paired with a CRT and its BASIC environment is extremely powerful, yet... basic! It's also small enough to mount inside almost anything and inexpensive enough to wreck a few of them in the process lol...



I used my Maximite quite a bit, right up until I hit some bugs in the firmware that never got fixed (thanks to the Colour Maximite being on an older version of MMBASIC.) 

I just got a Maximite 2. Now I need to pull my BASIC projects out of the closet (a Star Trek clone and Tradewars clone) and get them done. 

FYI you can download a console version of MMBASIC, as well. I know it runs on Windows, and I think you can compile it for *Nix. (Geoff will send source code to those  who ask, and you can compile it yourself.)

https://geoffg.net/WindowsMMBasic.html

I'd love to get a little MMBASIC trade group going... text-mode programs have always been fun to write, and I find myself constantly playing with ideas that I end up not finishing, for lack of a group to share them with.

 

 

User avatar
Cyber
Posts: 482
Joined: Mon Apr 27, 2020 7:36 am

MMBASIC ported to Pi Pico

Post by Cyber »



On 12/10/2021 at 9:59 PM, TomXP411 said:




I used my Maximite quite a bit, right up until I hit some bugs in the firmware that never got fixed (thanks to the Colour Maximite being on an older version of MMBASIC.) 



Firmware for all Maximites get updated from time to time with bug fixes. Have you checked if you have got the latest version? Did you reported your bugs to Geoff?

User avatar
Cyber
Posts: 482
Joined: Mon Apr 27, 2020 7:36 am

MMBASIC ported to Pi Pico

Post by Cyber »



On 12/10/2021 at 1:31 PM, Tatwi said:




I think the VGAMite is the perfect system to power a modern PET (or 70s terminal or Fallout) inspired computer



I agree! )

I already tried achieving similar result using Standard Micromite + ASCII Video Terminal. It looked nicely. You can even do some basic graphics using terminal escape codes. )

TomXP411
Posts: 1731
Joined: Tue May 19, 2020 8:49 pm

MMBASIC ported to Pi Pico

Post by TomXP411 »



On 12/15/2021 at 10:18 PM, Cyber said:




 



Firmware for all Maximites get updated from time to time with bug fixes. Have you checked if you have got the latest version? Did you reported your bugs to Geoff?



Looking at the change log, there does not seem to be any traction on the bugs I had and reported.

The biggest problem was simply that the Colour Maximite would only run MMBSASIC 4, where the current head version is 5.x. Since there are a lot of incompatibilities between 4.x and 5.x, that made it impossible for me to port software back and forth between the Colour Maximite and the other three Maximite based microcontrollers I'd purchased. 

There are some MMBASIC 4.x commands completely missing in 5, and the refactoring of variable names breaks a lot of legacy BASIC code.

For example, any program that uses the same name with different types will fail:

10 A$="HELLO"

20 A=123

30 PRINT A$,A

This is perfectly legal Microsoft BASIC code, but it does not work in MMBASIC 5. It did work in MMBASIC 4, but with 5, you get an "already declared" error. 

There's also a bug in the serial port buffering, where the buffer will collide with screen memory, especially if you open and close the serial port more than once. I actually did try to talk to Geoff about the problems, but got nowhere. I was told that the Maximite would not be getting an MMBASIC 5 upgrade, and the serial port question was ignored. 

Anyway, the lack of compatibility between the Color Maximite and the various Micromite boards made it frustrating to work in the ecosystem, and the serial port driver issues just made me throw my hands up and toss the whole lot in a box somewhere. I don't even know where it is now. 

I have ordered a Colour Maximite 2 (the CircuitGizmos version), and I'm going to evaluate that... but for now, I'm using QB64 to fill my BASIC coding itch. 

User avatar
Strider
Posts: 522
Joined: Thu Sep 03, 2020 4:34 pm
Location: In my time machine, Circa 1985.
Contact:

MMBASIC ported to Pi Pico

Post by Strider »


HOW did I miss this?!?!?

Seriously, I have been doing a lot with Arduino lately, but I kinda want to mess around with MMBasic and this gives me an excuse to mess with the Pico. At $4 a pop they are a pretty attractive micro-controller.

I really liked the Color Maximite 2 and wanted to get one when I first seen David review it, but was never able to do so, they were always sold out. I gave up on it, but MMBasic looks like fun to me.

I have a special place in my heart for BASIC, I gave up on programming a very long time ago, and only recently started fumbling though it to learn a bit later in life. At least this will be somewhat familiar, and I don't care about the speed on a micro-controller. So why not give it a try?  

Well...guess it's time to guy a few Picos... And down another rabbit hole I go. ?

Image
A classic geek & family man who enjoys all things retro! Computers, hardware, games, electronics, etc. Expert at nothing, professional hobbyist, and old-school blogger!
User avatar
Cyber
Posts: 482
Joined: Mon Apr 27, 2020 7:36 am

MMBASIC ported to Pi Pico

Post by Cyber »


VGAmite (the one based on BlackPill) is dropped for now, because Peter (developer) learned a way to produce 16 color VGA on RPi Pico's second processor. And it looks like Pico in all ways better than BlackPill.

User avatar
Tatwi
Posts: 103
Joined: Wed Sep 22, 2021 7:28 pm

MMBASIC ported to Pi Pico

Post by Tatwi »



On 12/19/2021 at 1:10 AM, Cyber said:




VGAmite (the one based on BlackPill) is dropped for now, because Peter (developer) learned a way to produce 16 color VGA on RPi Pico's second processor. And it looks like Pico in all ways better than BlackPill.



The Pico is only $5.25 vs. $25.99 for a BlackPil, here in Filthy Moose Caboose anyway. Hopefully they stick with this project long enough to fix all its bugs, but from what I have read that doesn't seem to be how they operate. "Good enough. On to the next shiny!" seems to be more their speed and while I completely understand, as Tom pointed out, it's less than ideal for the end users. Still, it's fairly ideal for powering a portable terminal, though so is the $14 Pi Zero W running plain old Debian.

mobluse
Posts: 172
Joined: Tue Aug 04, 2020 2:16 pm
Location: Lund, Sweden
Contact:

MMBASIC ported to Pi Pico

Post by mobluse »


I saw they added support for PS/2 keyboard. It seems to be going in the direction that Pico becomes a complete computer with screen and keyboard. I ported my program Aritm, that also exists for X16, to it from the GW-BASIC version, but originally it was for TinyBASIC (32-bit). MMBASIC V5 has a combination of logical and bitwise operations that made it a challange to port, but now it seems to work: https://github.com/mobluse/aritmjs/blob/master/aritm-mm.bas.

I run it on Maker Pi Pico by Cytron. Maker Pi Pico also has an SD card, but I have not tested that yet.

X16&C64 Quiz: Try It Now! Huge Char Demo: Try It Now! DECPS: Try It Now! Aritm: Try It Now!
mobluse
Posts: 172
Joined: Tue Aug 04, 2020 2:16 pm
Location: Lund, Sweden
Contact:

MMBASIC ported to Pi Pico

Post by mobluse »


SD card works also in Maker Pi Pico by Cytron by entering: OPTION SDCARD GP15, GP10, GP11, GP12

I have not tested VGA screen and PS/2 keyboard yet, but a beta build supports them. Aritm for MMBasic on PicoMite has been improved to support sound and RGB LED:

https://github.com/mobluse/aritmjs/blob/master/aritm-mm.bas.

I use:

PicoMiteVGA MMBasic Version 5.07.03b3

Copyright 2011-2021 Geoff Graham

Copyright 2016-2021 Peter Mather



> option list

OPTION MONO VGA ON

OPTION COLOURCODE ON

OPTION SDCARD GP15, GP10, GP11, GP12

OPTION Audio GP18,GP19, on PWM channel 1

X16&C64 Quiz: Try It Now! Huge Char Demo: Try It Now! DECPS: Try It Now! Aritm: Try It Now!
mobluse
Posts: 172
Joined: Tue Aug 04, 2020 2:16 pm
Location: Lund, Sweden
Contact:

MMBASIC ported to Pi Pico

Post by mobluse »


I wrote a program that demonstrates some differences between different BASIC dialects. There are four tests. First line of each test has no parenthesis, and then there are two lines with parenthesis, and they have initials of the BASIC code that works the same as the first line.

5 PRINT "AS=APPLESOFT, MM=MMBASIC, GW=GW-BASIC/BASIC V2"

10 PRINT 10,1 OR 1 AND 0

20 PRINT 20,1 OR (1 AND 0),"AS,GW"

30 PRINT 30,(1 OR 1) AND 0,"MM"

40 PRINT 40,1 = 2 <> 0

50 PRINT 50,1 = (2 <> 0),"MM"

60 PRINT 60,(1 = 2) <> 0,"AS,GW"

70 PRINT 70,-1^2

80 PRINT 80,-(1^2),"GW"

90 PRINT 90,(-1)^2,"AS,MM"

100 PRINT 100,NOT 3<7

110 PRINT 110,NOT (3<7),"GW"

120 PRINT 120,(NOT 3)<7,"AS,MM"

As you can see MMBasic is rather like AppleSoft BASIC, except for OR and AND, and = and <>. YABasic works as GW-BASIC/BASIC V2 (except False is -1 for GW-BASIC/BASICV2), and Python works as YABasic after translation:

print("AS=AppleSoft, MM=MMBasic, GW=GW-BASIC")

print(10,1 or 1 and 0)

print(20,1 or (1 and 0),"AS,GW")

print(30,(1 or 1) and 0,"MM")

print(40,1 == 2 != 0)

print(50,1 == (2 != 0),"MM")

print(60,(1 == 2) != 0,"AS,GW")

print(70,-1**2)

print(80,-(1**2),"GW")

print(90,(-1)**2,"AS,MM")

print(100,not 3<7)

print(110,not (3<7),"GW")

print(120,(not 3)<7,"AS,MM")

X16&C64 Quiz: Try It Now! Huge Char Demo: Try It Now! DECPS: Try It Now! Aritm: Try It Now!
Post Reply