Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 10:01 05 May 2024 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 : Raspberry Pi enters microcontrer game with a $4 Pico

     Page 2 of 7    
Author Message
mclout999
Guru

Joined: 05/07/2020
Location: United States
Posts: 430
Posted: 07:06pm 22 Jan 2021
Copy link to clipboard 
Print this post

  lizby said  
  lew247 said  It's a shame the ESP32 can't have MM basic I guess it's because it can only run small displays and not the SSd's or vga/hdmi

There's this VGA module (about which I know no more than that link reveals).


I have one of these and use it to make a rather nice VIC 20 and a ZX Spectrum emulator.  Both work surprisingly well but none of them use the Micro SD card as of yet.  The unit you show is the 1.4V that added the SD card but the first ones do not have it.  I am hoping to see some of the developers implement it.  One ZX developer is working on it. The FabGL project is the key to its usefulness. It is an API including a graphic engine with sprites and primitives, and sound drives, and a GUI interphase. https://github.com/fdivitto/FabGL

The VIC 20 is included in the examples section of the get hub files. It has been fun playing with it. It has Keyboard mouse WIFI and BlueTooth right out of the box.

ZX info
https://github.com/rampa069/ZX-ESPectrum

https://github.com/dcrespo3d/ZX-ESPectrum-Wiimote

https://github.com/dcrespo3d/ZX-ESPectrum-Wiimote/tree/lilygo-ttgo-vga32
 
RetroJoe

Senior Member

Joined: 06/08/2020
Location: Canada
Posts: 290
Posted: 08:22pm 22 Jan 2021
Copy link to clipboard 
Print this post

Other than the boatload of work involved, I see no obvious reason why MMB could not be ported to it.

Technically, the architecture of the TTGO VGA32 is very similar to the CMM, plus it has built in PS/2 mouse, WiFi and BT, all of which would be great capabilities to have out of the box.

I believe the ESP32 on it runs at 240MHz, which simplistically implies it would be half as fast as the CMM2 (plus fewer colors, lower resolutions, no GPIO, etc). Still, it would still be plenty fast and capable, and an excellent price point (< $20) and form factor (only slightly larger than the PS/2 and VGA connectors!) for a "Color MiniMite"

mclout, I have the 1.4 model and can confirm the SD card works - I'm almost certain it's the Altair CP/M emulator (also in the FabGL library...) that mounts it.

With or without MMBasic, it's a great little gadget to play with, and an excellent way to get started with Arduino stuff.
Enjoy Every Sandwich / Joe P.
 
ceptimus
Senior Member

Joined: 05/07/2019
Location: United Kingdom
Posts: 130
Posted: 09:01pm 22 Jan 2021
Copy link to clipboard 
Print this post

It does have integer divider peripherals, one per core, 8 cycles.  32-bit, I think.
Edited 2021-01-23 07:07 by ceptimus
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8592
Posted: 10:46pm 22 Jan 2021
Copy link to clipboard 
Print this post

  Quote  It does have integer divider peripherals, one per core, 8 cycles.  32-bit, I think.


Not if it is an M0+

https://en.wikipedia.org/wiki/ARM_Cortex-M#Cortex-M0
 
ceptimus
Senior Member

Joined: 05/07/2019
Location: United Kingdom
Posts: 130
Posted: 11:34pm 22 Jan 2021
Copy link to clipboard 
Print this post

  matherp said  
  Quote  It does have integer divider peripherals, one per core, 8 cycles.  32-bit, I think.


Not if it is an M0+

https://en.wikipedia.org/wiki/ARM_Cortex-M#Cortex-M0


It's not the M0 core that does division - it's the SIO peripheral - a bit like the old maths coprocessor chips, but integer only.  The SIO is described on page 24 of the 636 page datasheet.  There is one of these SIO peripherals for each of the cores.
Edited 2021-01-23 09:36 by ceptimus
 
mclout999
Guru

Joined: 05/07/2020
Location: United States
Posts: 430
Posted: 12:00am 23 Jan 2021
Copy link to clipboard 
Print this post

  Quote   no GPIO, etc


Actually, there are 10 GPIOs on there if you solder on a header, or am I wrong? I never tried the Altair CP/M emulator so it is nice to know.  I really would like to see it in the VIC 20 and ZX more though.
 
RetroJoe

Senior Member

Joined: 06/08/2020
Location: Canada
Posts: 290
Posted: 03:11am 23 Jan 2021
Copy link to clipboard 
Print this post

Mine has a 2X4 grid of solder pads silkscreened with IO2, IO12, IO13, I014, IO34 and IO39, plus 3.3V and GND. So, yes, I assume you can do some modest amount of real-world IO - maybe to to wire up a 4-way joystick? If you have the eye-hand coordination of a surgeon, I guess you could also solder wires on to the ESP32 flatpack traces - I won't be trying that :)
Edited 2021-01-23 13:13 by RetroJoe
Enjoy Every Sandwich / Joe P.
 
mclout999
Guru

Joined: 05/07/2020
Location: United States
Posts: 430
Posted: 06:39am 23 Jan 2021
Copy link to clipboard 
Print this post

  Quote  Mine has a 2X4 grid of solder pads silkscreened with IO2, IO12, IO13, I014, IO34 and IO39, plus 3.3V and GND.
Sorry my bad I remember there being 10. I was wondering if those would be sufficient to connect some PSRAM as many of the projects rely on for the more advanced features.  I have asked one of the developers and have not heard back from them for a long time.
 
Cyber

Senior Member

Joined: 13/01/2019
Location: Ukraine
Posts: 161
Posted: 06:56am 23 Jan 2021
Copy link to clipboard 
Print this post

  RetroJoe said  Other than the boatload of work involved, I see no obvious reason why MMB could not be ported to it.

Technically, the architecture of the TTGO VGA32 is very similar to the CMM, plus it has built in PS/2 mouse, WiFi and BT, all of which would be great capabilities to have out of the box.

If I undersand things correctly, all existing MMBasic products are not an emulation. They actually use real hardware. And so existing MMBasic firmaware has some requirements to the hardware it would be run on, some of which matherp mentioned earlier in this thread.

So in other words if you would like to port MMBasic firmware to a different hardware, you might need to rewrite a lot of code. It might be even a complete rewrite. And it might turn out a very different product.
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3663
Posted: 08:21am 23 Jan 2021
Copy link to clipboard 
Print this post

You're right, MMBasic is not "an emulation".

It's been ported enough to show that a complete re-write would not be needed, but new low level code (memory handling, timers, I/O, etc) would be needed.  Also, if a new CPU family then there's getting to grips with a new toolchain (hopefully gcc or gcc-derived, to reduce the effort).

As the TTGO VGA32 doesn't seem to be dramatically better than existing MMBasic (say on the CMM2), will anyone want to put in the months of effort?  I guess not.

John
 
mclout999
Guru

Joined: 05/07/2020
Location: United States
Posts: 430
Posted: 08:56am 23 Jan 2021
Copy link to clipboard 
Print this post

  Quote  As the TTGO VGA32 doesn't seem to be dramatically better than existing MMBasic (say on the CMM2), will anyone want to put in the months of effort?  I guess not.


But it is cheap as hell(I got mine for $12 delivered and paid $130 for my CMM2, not complaining, apples and oranges) so that might give a little incentive. With a PS/2 KB & mouse and a VGA monitor your DONE.  It comes with libraries for things like real WIFI and BlueTooth so you can TELNET into it or hit the internet and connect a whole host of BT controllers and possibly KBs and Mice in the future.  There are a lot of libraries for ESP32 out there that give it a lot of options. It is a very interesting device BUT NOWHERE NEAR a much as the CMM2.  There is a wide variance of activity on any of the many disparate projects that you would have to depend on. Some are works in progress but others are mature and stable. This is in comparison to the razor focus and responsiveness that our developers have devoted to The CMM2.
 
lew247

Guru

Joined: 23/12/2015
Location: United Kingdom
Posts: 1676
Posted: 10:06am 23 Jan 2021
Copy link to clipboard 
Print this post

  matherp said  FWIW IMHO
This chip is a dog. No floating point except S/W, no integer divide, only 32 bit multiply with 32-bit result (not even 64-bit result). Very limited subset of Thumb2 so lots of extra instructions for simple tasks
Other than the "Raspberry" name there is absolutely no reason I can see to use it over the ESP32 which is well supported and better in almost every aspect


The ESP32 does not have or run mmbasic is one reason.
the Esp32 doesn't have enough ports
I thought that seeing this one has programmable io ports maybe it could be used instead of the Pi if it had mmbasic on it

Rp2040 datasheet

It has a Fast single-precision floating point library.

I don't know what these mean but its 64bit as well as 32




The  processor  implements  the  ARMv6-M  Thumb  instruction  set,  including  a  number  of  32-bit  instructions  that  useThumb-2 technology. The ARMv6-M instruction set comprises: All of the 16-bit Thumb instructions from ARMv7-M excluding CBZ, CBNZ and IT. The 32-bit Thumb instructions BL, DMB, DSB, ISB, MRS and MSR.

No idea what thumb is or does

It's also Tiny - this is on my index finger


Edited 2021-01-23 20:13 by lew247
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8592
Posted: 10:31am 23 Jan 2021
Copy link to clipboard 
Print this post

  Quote  the Esp32 doesn't have enough ports


I count 32 on a typical ESP32 VROOM-32D board and 26 on this

  Quote  It has a Fast single-precision floating point library.


This is still software it just happens to be in a ROM, the ESP has a Hardware single precision FPU

  Quote  The ESP32 does not have or run mmbasic is one reason.


Nor does this and I certainly won't be porting to it.

Both have the disadvantage that they don't have internal flash memory so code is stored on a comparatively slow external flash chip and they then rely on caching to give reasonable performance. At least the ESP32 has double the amount of RAM and faster processors
ESP publish a DMIP benchmark rating of 600
can't find a published figure for the RP2040 but the ARM M0+ is maximum 1.36DMIP/MHz so 1.36*133*2=362  
for reference the CMM2 uP is 1027 DMIPS)
 
ceptimus
Senior Member

Joined: 05/07/2019
Location: United Kingdom
Posts: 130
Posted: 02:55pm 23 Jan 2021
Copy link to clipboard 
Print this post

Quote from the pico_c_sdk.pdf datasheet, page 25

The SDK includes optimized 32 and 64 bit division functions accelerated by the RP2040 hardware divider.

There are graphs in the datasheet showing that the 64-bit divides are typically twelve to twenty times faster than can be accomplished by the M0 core alone.
Edited 2021-01-24 00:55 by ceptimus
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8592
Posted: 03:16pm 23 Jan 2021
Copy link to clipboard 
Print this post

  Quote  There are graphs in the datasheet showing that the 64-bit divides are typically twelve to twenty times faster than can be accomplished by the M0 core alone.


Yes understood - but that is just integer divide - no FPU just some ROM software of unknown provenance

Everyone will make up their own mind but for me this is a poor imitation of the ESP32 and has little of no advantage over a normal ARM processor such as packaged by ST. Why did they not just use the M4 core and then there would be no need for a one-function co-processor?
 
ceptimus
Senior Member

Joined: 05/07/2019
Location: United Kingdom
Posts: 130
Posted: 03:26pm 23 Jan 2021
Copy link to clipboard 
Print this post

I don't think it's just ROM software.  It's a piece of hardware that does multiplication and division.

I suspect this is just the first in the line of Raspberry Pi products that will eventually allow them to release something much more powerful that doesn't rely on the Broadcom-specific chip with it's closed hardware and firmware.

Judging on the Raspberry Pi foundation's past performance, there are almost sure to be future Pi Pico models 2, 3, 4, ... and these will no doubt have better, faster processors with more RAM, Flash, etc.
Edited 2021-01-24 01:30 by ceptimus
 
Plasmamac

Guru

Joined: 31/01/2019
Location: Germany
Posts: 501
Posted: 03:27pm 23 Jan 2021
Copy link to clipboard 
Print this post

Posted: 12:32pm 22 Jan 2021
Copy link to clipboard
Print this post
Quote

FWIW IMHO

This chip is a dog.

Hi Matherp , what is this meaning? I know the words bit not the slang.
Plasma
 
RetroJoe

Senior Member

Joined: 06/08/2020
Location: Canada
Posts: 290
Posted: 03:27pm 23 Jan 2021
Copy link to clipboard 
Print this post

Great discussion.

I guess lew247's original thesis was that because the Pico is ARM based like the STM32, it would be "easy" to port MMBasic to it.

In the immortal words of Jethro Tull, nothing is easy, and if there is ever to be a "Color MiniMite" in our future, its purpose should be to materially change the market landscape, to the extent that there is a market for retro/hobbyist MCU-based computers.

My view is the biggest barriers to knock down are cost and availability. The CMM2 hardware is esoteric and relatively expensive, even (especially?) if you go the DIY route. It's reach will always be limited as a result, whereas the ESP32 marketplace is big and getting bigger, and highly competitive which drives HW prices down.

To address JohnS's point, a MMBasic port to the TTGO VGA would be a modest step backwards in terms of raw specs, but it would be a very big step forward in terms of price / performance and general availability. You could also argue that the lower resolutions and limited memory of the TTGO VGA is better aligned with the specs of the classic 8-bit machines that are typically of interest to this market segment. And, it's already been noted a few times that the TTGO neatly closes many of the CMM2 HW gaps e.g. mouse support, WiFi and Bluetooth, the latter ideal for multiple game controllers.of your choosing.

FYI, I did a little research, and from what I can piece together is that Fabrizio di Vittorio (of "FabGL" fame) created an ESP32 dev board to support his code development efforts (it's still available on his website), and Lilygo adopted his HW design i.e the TTGO VGA is basically a mass market clone of Fabrizio's board.

Anyway, this is all theoretical until someone is willing to do the hard yards of porting MMBasic.

Peter, I can't help but think you've already thought all this stuff through when you evolved the CMM2 from the original CMM, so maybe you can put this discussion to bed.

Forgetting the "should" part of the debate, "could" it be done technically, and do you think performance would be "good enough" to make it an attractive hobbyist machine? My naive guess is "yes", as MMBasic compiled for the Tensilica core *should* be plenty fast.
Enjoy Every Sandwich / Joe P.
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3848
Posted: 03:40pm 23 Jan 2021
Copy link to clipboard 
Print this post

My 2c.

The CMM2 community doesn't need to create it's own competitor and fragment it's base.

Our problems are not price/performance (the existing CMM2 is already cheap in the grand scheme of things), but are:

- Market for retro computers is pretty small.
- No social media visibility.
- The CMM2 lacks the romance (and back catalogue) of actually being a clone of a retro machine.
- No good and persistent mechanism to advertise and share software.

None of these are solved by Peter porting MMBasic to yet another platform.

YMMV.

Best wishes,

Tom
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
ceptimus
Senior Member

Joined: 05/07/2019
Location: United Kingdom
Posts: 130
Posted: 03:41pm 23 Jan 2021
Copy link to clipboard 
Print this post

I'm not suggesting porting MMBASIC to the Pi Pico, by the way - that's a decision for anyone who has the ability and inclination to do the hard work involved.

The Pi foundation is more interested in Python (which is, in part, the origin of the "Pi" name).  So Python use is bound to be well supported, regularly updated, and with a huge user base.  Python is arguably a modern form of BASIC and perhaps has a more promising future than BASIC.

I know that many people hate the fact that indentation is a critical part of the Python syntax - but that doesn't bother me.  I always strive to indent my code consistently anyway - no matter which language I'm writing it in.  And any code I write for the Pi Pico is most likely to be in C++, with a sprinkling of assembler.

I'm sure that there are preprocessors out there that can convert source code with braces into space-indented Python format, for those who really want it!
Edited 2021-01-24 01:46 by ceptimus
 
     Page 2 of 7    
Print this page
© JAQ Software 2024