Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 12:51 20 Apr 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 : ESP32 Special Interest Group

Author Message
RetroJoe

Senior Member

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

Dedicated thread in "Microcontroller and PC Projects" to explore the ESP32 MCU, in particular the retrocomputing potential of low-cost devices like the TTGO VGA32

Forked from here.
Edited 2021-01-26 09:03 by RetroJoe
Enjoy Every Sandwich / Joe P.
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3010
Posted: 01:01am 26 Jan 2021
Copy link to clipboard 
Print this post

There's lots available on the ESP32, including with Annex RDS Basic (also including the ESP8266), and many posts at Random Nerd Tutorials (but these are not looking at the retro-computing aspect).
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
RetroJoe

Senior Member

Joined: 06/08/2020
Location: Canada
Posts: 290
Posted: 02:24am 26 Jan 2021
Copy link to clipboard 
Print this post

Thank you, sir!

MicroPython seems to be the "natural" direction to go for ESP32 interpreters, but there are five BASIC implementations I am aware of. Unfortunately all of them are implemented via some sort of emulation or abstraction, which is not really the point of this thread:

1) Commodore BASIC via VIC-20 / 6502 emulation (included in the FabGL library)
2) Microsoft BASIC via Altair CPM / Z80 emulation (also included in FabGL, nice write-up here)
3) Sinclair BASIC via Spectrum / Z80 emulation (the ESPectrum project)
4) Atari BASIC via Atari 800 / 6502 emulation (the project is ESP_8_BIT)
5) Proprietary BASIC dialect on the "Eris Retrocomputer" (Github here - not sure if this project is still active, and even this BASIC is not "native" on the ESP32, as the "Eris" is a pseudo-machine with a proprietary instruction set!)

All of the above except (4) will run on the TTGO VGA32. The ESP_8_BIT also emulates NES and SMS consoles, but instead of the R/2R VGA ladder, it implements composite NTSC using the ESP32's PLL.
Edited 2021-01-26 12:31 by RetroJoe
Enjoy Every Sandwich / Joe P.
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3010
Posted: 03:18am 26 Jan 2021
Copy link to clipboard 
Print this post

Annex Basic for the ESP32 is not an emulation--it's an interpreter like MMBasic. But it is more for microprocessor applications (like MMBasic on platforms other than CMM1 and CMM2) than for anything retro (e.g., games). And of course, it supports wifi and bluetooth and has many network-oriented features.

As far as I know, it has not been developed to run on the TTGO VGA32--but will run on some ESP32-CAM modules.

I don't know for sure but I think the ESP32 is significantly lacking in horsepower to do what the CMM2 can graphically, even with C programming.
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
zeitfest
Guru

Joined: 31/07/2019
Location: Australia
Posts: 375
Posted: 05:18am 26 Jan 2021
Copy link to clipboard 
Print this post

Caution for the A/D :

AD error
 
RetroJoe

Senior Member

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

  lizby said   I don't know for sure but I think the ESP32 is significantly lacking in horsepower to do what the CMM2 can graphically, even with C programming.


I'm almost certain you are right.

Empirically, all we know is that the TTGO VGA32 has enough horsepower to run emulated 8-bit medium-res games at decent framerates.

As Peter mentioned in the Pico thread, there are too many variables to make any credible predictions about what kind of performance a MMBasic interpreter compiled for the ESP32 would have.

But, lower performance and specs would be OK. The goal is not to compete with the CMM2, rather to expand the MM community with an entry-level, commoditized hardware option. Some performance trade-offs would be normal and expected at 1/5 of the price.

As mclout99 pointed out earlier, the TCO would also have to factor in the cost of a PS/2 keyboard and mouse, and a VGA-compatible display.

Most of us have such things lying around, but they would be difficult to source in any volume e.g. to equip an entire classroom. Using the ESP32's Bluetooth for the keyboard and mouse might be the optimal solution (although BT keyboard / mouse combos are not cheap...), as could an inexpensive VGA-to-HDMI adapter.
Edited 2021-01-27 01:41 by RetroJoe
Enjoy Every Sandwich / Joe P.
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3010
Posted: 05:40pm 26 Jan 2021
Copy link to clipboard 
Print this post

Here's a link to benchmarks of Annex Basic (ESP32 and ESP8266) showing the ESP32 about half the speed of the 28-pin micromite (and the ESP8266 slower): ESP benchmarks
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
RetroJoe

Senior Member

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

Thanks again. Annex RDS looks like a very cool project (albeit very much geared to hardcore MCU applications, per your earlier comment). Too bad they haven't made the source code for the BASIC interpreter available.
Edited 2021-01-27 04:29 by RetroJoe
Enjoy Every Sandwich / Joe P.
 
Quazee137

Guru

Joined: 07/08/2016
Location: United States
Posts: 522
Posted: 05:49pm 28 Jan 2021
Copy link to clipboard 
Print this post

I played with Annex Basic on the ESP8266 and I liked it but I can't make use of
it because I get paid for the design and coding of prototypes.
I would love to see MMBasic on the ESP32. I have used assembly language on so
many chips in the past. MMBasic makes it so easy to do I'm now spoiled and don't
see going back. So the more chips MMBasic will work on the better.

I had plans of using the RPi and its HDMI to build a PLC controller but they
made it harder to keep MMBasic on it. I could use the CMM2 but it is a bit bulky
for me. A 4" to 7" HDMI or SPI LCD touch screen no keyboard, mouse or game port
but I2C, serial 232/422/485 PCB running the CMM2 basic would be FUN to use.
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3010
Posted: 06:14pm 28 Jan 2021
Copy link to clipboard 
Print this post

  Quazee137 said  A 4" to 7" HDMI or SPI LCD touch screen no keyboard, mouse or game port but I2C, serial 232/422/485 PCB running the CMM2 basic would be FUN to use.

I know it has only a 3.2 inch Touch Screen TFT LCD, but what do you see as the advantage of the (obviously superior for graphics, and speedier) CMM2 MMBasic over the F4 MMBasic on the STM32F407VET6?

I haven't looked to see whether a larger LCD than the linked 320x240 on could be fitted (and supported).

(FWIW I'd also like to see MMBasic on the ESP32, but without any effort put into making it like the CMM2--I don't think it's fast enough to make that worthwhile. But a daughter board with ESP8266 might make the F4 functionally equivalent, and faster (but a lot bigger).)

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

Guru

Joined: 06/08/2020
Location: United Kingdom
Posts: 367
Posted: 10:19pm 28 Jan 2021
Copy link to clipboard 
Print this post

  lizby said  
  Quazee137 said  A 4" to 7" HDMI or SPI LCD touch screen no keyboard, mouse or game port but I2C, serial 232/422/485 PCB running the CMM2 basic would be FUN to use.

I know it has only a 3.2 inch Touch Screen TFT LCD, but what do you see as the advantage of the (obviously superior for graphics, and speedier) CMM2 MMBasic over the F4 MMBasic on the STM32F407VET6?

I haven't looked to see whether a larger LCD than the linked 320x240 on could be fitted (and supported).

(FWIW I'd also like to see MMBasic on the ESP32, but without any effort put into making it like the CMM2--I don't think it's fast enough to make that worthwhile. But a daughter board with ESP8266 might make the F4 functionally equivalent, and faster (but a lot bigger).)

~


Hi

Forgive the naive questions - presumably I can add a USB keyboard to the above device?  Flashed correctly, this would boot to MMBasic and display via the TFT screen?   Seems like I would have a self contained piece of kit that with appropriate case, I could use in class?

For the price, seems too good to be true.

Cheers
Nim
Edited 2021-01-29 08:20 by Nimue
Entropy is not what it used to be
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3010
Posted: 10:53pm 28 Jan 2021
Copy link to clipboard 
Print this post

  Nimue said  Forgive the naive questions - presumably I can add a USB keyboard to the above device?  Flashed correctly, this would boot to MMBasic and display via the TFT screen?   Seems like I would have a self contained piece of kit that with appropriate case, I could use in class?.


I've never seen anything about a keyboard on the Armmite F4. It's basically a microcontroller which runs MMBasic. I don't think it has USB support. It supports the older style MMBasic graphics, but has none of the fancy CMM2 stuff.

  Nimue said  For the price, seems too good to be true.


It's true and it's good (for its intended use).

I don't think a Manual specific to the F4 was ever produced. The Armmite H7 manual is the most appropriate (but that is supplemental to the Micromite Plus and Micromite eXtreme manuals).

For more info, search for "Armmite F4" (all words) in the subject, with matherp as author.
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
hitsware2

Guru

Joined: 03/08/2019
Location: United States
Posts: 705
Posted: 02:17am 29 Jan 2021
Copy link to clipboard 
Print this post

Not ESP32 but runs Basic ....
my site
 
RetroJoe

Senior Member

Joined: 06/08/2020
Location: Canada
Posts: 290
Posted: 04:47am 29 Jan 2021
Copy link to clipboard 
Print this post

$10 - purtay, purtay, purtay nice price point :)

There are several "headless stamps" that run BASIC (and/or MicroPython, or "CircuitPython") over a USB or serial connection, but IMO there is a qualitative difference between those types of MCU dev boards and a self-hosted standalone device with its own keyboard, mouse and display.

It's what makes the TTGO VGA32 (and the CMM2...) so intriguing.

@lizby, that being said, regarding MMBasic on ESP32 sans CMM2-type support, is there a widely recognized "reference" ESP32 dev board that could serve as a target? It seems like an elegant and useful interim step i.e. I imagine a lot of the low-level fiddling to adapt MMBasic to a device like the TTGO VGA2 is precisely in the areas of video, sound, keyboard/mouse, SD card IO, etc.

@Qauzee137, I assume you have been using pre-CMM2 devices in the Maximite family? As I asserted in another thread, I consider MMBasic to be "The Platform" - the underlying HW is somewhat secondary. My MMBasic journey began with the CMM2, so I don't have much knowledge of all the devices in the MM family, nor are my interests primarily in the PLC type of use cases many of the folks here seem to be focused on (professionally and otherwise).

But, I'm getting there - last night, I wrote a little program to read an IR remote control and display an on-screen replica highlighting the pressed buttons - fun! Next step is to make the remote do something useful via the CMM2 GPIO. My efforts in this vein are partially intended to get my son intrigued in developing skills other than playing video games :)
Edited 2021-01-29 14:56 by RetroJoe
Enjoy Every Sandwich / Joe P.
 
mclout999
Guru

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

  hitsware2 said  Not ESP32 but runs Basic ....


But for $3 more you get a VGA32 with a vast array of libraries and project out there to play with. When I first looked into it I found one on sale for  $8.99 with free shipping, but I did not pull the trigger.  Still, $13 delivered is still nothing and I learned so much about the  3 IDEs that you can program it with.
 
hitsware2

Guru

Joined: 03/08/2019
Location: United States
Posts: 705
Posted: 05:31am 29 Jan 2021
Copy link to clipboard 
Print this post

  mclout999 said  
  hitsware2 said  Not ESP32 but runs Basic ....


But for $3 more you get a VGA32 with a vast array of libraries and project out there to play with. When I first looked into it I found one on sale for  $8.99 with free shipping, but I did not pull the trigger.  Still, $13 delivered is still nothing and I learned so much about the  3 IDEs that you can program it with.

Right ... But sans Basic .... Right ?
my site
 
mclout999
Guru

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

  Quote  Right ... But sans Basic .... Right ?


Well, true but for now I am enjoying it with all the other projects out there. If you want you can program it in Commodore VIC 20 and ZX basic for now. I Do not like the graphic limitation of either of those platforms so much but maybe MM or other bare metal basic will be developed for it at some point. I just love the form factor, KB, mouse, SD card, WIFI, and BlueTooth.  It is just so feature-packed for SO LITTLE MONEY. When I was looking at the First CMM I also found the VGA32 and wished then for something like MM on it then the CMM2 came around and I PULLED THE TRIGGER right away on that and am glad I did, even more so when I see how amazing the developer is. The CMM2 has radically improved in almost every way in a shockingly short time.  I just like the little VGA32 and think it would be a great target for a CMM like implementation. All of the hardware heavy lifting has already been done on it and it has so much potential. I just wish I had the kind of skills to do it myself.
 
RetroJoe

Senior Member

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

I just bought a second PS/2 mouse for my TTGO VGA so I could leave the one attached to my CMM2 undisturbed (if you saw my photo in the "Mouse Heaven" thread, you will understand why I don't want to fiddle with it too much!).

In many respects, it's a positive thing there is no MMBasic for this remarkable little device... yet :)

@mclout999, to your point, it's forcing me to discover and experiment with a bunch of new tools and languages e.g. C++ and PlatformIO.

I also share your frustration that I don't have the low-level coding skills to tackle a MMBasic port myself, but I'm almost certain some bright spark will "connect the dots" soon enough i.e. port a native BASIC and/or Python dialect to it.
Enjoy Every Sandwich / Joe P.
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3010
Posted: 02:05pm 29 Jan 2021
Copy link to clipboard 
Print this post

  RetroJoe said  $10 - purtay, purtay, purtay nice price point :)

But no better than the STM32F407VET6, which in addition to running MMBasic also includes an RTC, a micro SD adaptor, and a connector for an inexpensive LCD.

  RetroJoe said  @lizby, that being said, regarding MMBasic on ESP32 sans CMM2-type support, is there a widely recognized "reference" ESP32 dev board that could serve as a target? It seems like an elegant and useful interim step i.e. I imagine a lot of the low-level fiddling to adapt MMBasic to a device like the TTGO VGA2 is precisely in the areas of video, sound, keyboard/mouse, SD card IO, etc.

I don't have extensive experience with ESP32 boards, but I like the ESP32 D1 Mini.

I even made a breakout board for it, including connector for an ILI9341 TFT LCD and micro SD module:



~
Edited 2021-01-30 02:22 by lizby
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3010
Posted: 06:20pm 29 Jan 2021
Copy link to clipboard 
Print this post

  Nimue said  presumably I can add a USB keyboard to the above device?

(Device is the F4.)
While the F4 does not support a USB keyboard, it does support a PS2 one, pin 77, PA15 for keyboard clock, and pin 84, PD3 for keyboard data.

In another thread, matherp said there was a post about that somewhere on TBS, but I couldn't find it. I don't have a PS2 keyboard (but have ordered one, and will check it out).

Here is the wiring diagram (from the Micromite Plus manual):



PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
Print this page


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

© JAQ Software 2024