Raspberry BASIC

Recent Posts

Pages: 1 ... 3 4 [5] 6 7 ... 10
41
BBC BASIC / Re: New: Console Mode editions of BBC BASIC
« Last post by John Spikowski on July 20, 2021, 09:25:39 AM »
Ubuntu 64 for the RPI is an option of the official RPi installer. Based on the support and updates coming from Ubuntu for the RPi 64 I foresee Ubuntu becoming RPi's default 64 bit offering.

I'm currently running GitLab-ce on my RPi 4b 8GB. (https://basic-sandbox.us)

ScriptBasic 64 bit also runs fine on Ubuntu ARM 64 bit.

Here is a CGI echo example running on the ScriptBasic Application Server running on the same RPi 4B.

http://23.90.90.91:9090/home/echo

http://23.90.90.91:9090/home/web4cast    <-- This is using the cURL extension module to get the current weather from OpenWeather for Anacortes WA.







42
BBC BASIC / Re: New: Console Mode editions of BBC BASIC
« Last post by Richard Russell on July 20, 2021, 08:21:24 AM »
Would this version allow me to run BBC BASIC on my Ubuntu ARM 64 bit OS on a RPi 4B?

I only intend to build binaries for 'official' releases of Raspberry Pi OS (which is Debian, not Ubuntu) so currently that's the 32-bit 'stable' release and the 64-bit beta-test version.  My expectation would be that the Console Mode edition of BBC BASIC is unlikely to care whether it's Debian or Ubuntu, but the GUI version might be more fussy because of its dependence on graphics drivers etc.

If it turns out that the binary is not compatible with Ubuntu you could easily build a custom version (either Console or GUI) from the source, which should have a better chance of running.
43
BBC BASIC / Re: New: Console Mode editions of BBC BASIC
« Last post by John Spikowski on July 20, 2021, 01:02:08 AM »
Hi Richard,

Would this version allow me to run BBC BASIC on my Ubuntu ARM 64 bit OS on a RPi 4B?
44
BBC BASIC / Re: New: Console Mode editions of BBC BASIC
« Last post by Richard Russell on July 18, 2021, 02:13:34 PM »
I have updated the Console Mode editions of BBC BASIC to version 0.35.  The changes in this version are:

  • An edition for the 64-bit Raspberry Pi OS (currently in beta test) has been added.  This typically runs more than twice as fast as the 32-bit Raspberry Pi edition.

  • The Mac M1 ('Apple Silicon') edition now has an AArch64 assembler.  It has limited usefulness because Apple enforce the Hardened Runtime on this platform, but you could still use it to export assembled code to a file.

Version 0.35 may be downloaded from the usual place:

45
BBC BASIC / BBC BASIC for SDL 2.0 version 1.23a released
« Last post by Richard Russell on July 09, 2021, 01:19:32 PM »
I've released version 1.23a of BBC BASIC for SDL 2.0 - the cross-platform programming language for Windows, MacOS, Linux, Raspberry Pi OS, Android, iOS and in-browser.  The changes in this version are as follows:

  • BASIC Interpreter / Run Time Engine

    An experimental build for the 64-bit Raspberry Pi OS has been added (with many thanks to Simon Willcocks who wrote the AArch64 assembler which made it possible).  This runs more than twice as fast as the 32-bit Pi OS edition!

    On a MODE change, the window will be centered only if it would otherwise extend beyond the edge of the desktop.

    If SDL's message system is unavailable (which it currently is on 64-bit Pi OS), fatal errors will be reported in a MODE 7 window.

  • IDEs and Utilities

    Extended SDLIDE.bbc so Ctrl+Backspace is delete word left and Ctrl+Delete is delete word right.  Alt (Option) may be used instead of Ctrl, for compatibility with Apple Macs.

    Extended the Cross Reference utility to report mismatched quotes, parentheses and braces.

    Fixed a couple of minor bugs in the Cruncher, one of which could cause the output file to be larger than it needed to be.

    Updated BBCEdit to version 0.38.1, with thanks to Andy Parkes.

  • Libraries

    Added msgbox.bbc which provides support for Message Boxes, similar to those available in Windows.

    Updated filedlg to save and restore the VDU state (e.g. colours, viewports).

    Updated the Box2D libraries to be compatible with the 64-bit Raspberry Pi OS.

    Extended sdldebug.bbc and timerlib.bbc to include a 64-bit ARM (AArch64) version of the assembler code.

  • Example Programs

    Extended hello.bbc to include a 64-bit ARM (AArch64) version of the assembler code.

    Simplified telstar.bbc by using the built-in MODE 7 font in BBCSDL (and MODE7LIB in BB4W).

    Updated several examples to replace SDL's message boxes with BBC BASIC-created ones.

This version may be downloaded, for all the supported platforms, from the usual location.  The GitHub repository has been updated (used to build the MacOS, Raspberry Pi, Android, iOS, 64-bit Linux and in-browser editions, currently).
46
BBC BASIC / Re: New: Console Mode editions of BBC BASIC
« Last post by Richard Russell on June 11, 2021, 02:57:53 PM »
I have updated the Console Mode editions of BBC BASIC to version 0.34.  The changes in this version are:

  • I've (hopefully) worked around the apparent bug in MinGW's implementation of the _ftelli64() function.
  • Execution speed has been improved by about 10% by optimising the expression evaluator.

Version 0.34 may be downloaded from the usual place:

47
BBC BASIC / BBC BASIC for SDL 2.0 version 1.22a released
« Last post by Richard Russell on May 28, 2021, 04:56:15 PM »
I've released version 1.22a of BBC BASIC for SDL 2.0 - the cross-platform programming language for Windows, MacOS, Linux, Raspbian, Android, iOS and in-browser.  The changes in this version are as follows:

  • BASIC Interpreter / Run Time Engine

    Cmd+left, Cmd+right, Cmd+up and Cmd+down are mapped to Home, End, Ctrl+Home and Ctrl+End, respectively, for improved compatibility with Apple Macs.

    In the in-browser edition *RUN now runs JavaScript code (previously it did nothing useful) e.g. OSCLI "window.open(""http://www.rtrussell.co.uk"")"

    The QUIT n statement can now accept a parameter of zero (ARM and 64-bit editions only, 32-bit x86 editions always could).

    A few performance optimisations have been carried out (e.g. fixing memory alignment issues).

  • IDEs and Utilities

    In SDLIDE.bbc Alt+left and Alt+right are mapped to Word Left and Word Right, respectively, for improved compatibility with Apple Macs.

    Added a -P command-line switch to SDLIDE.bbc to activate the profiler.

    The Android and iOS editions report if a later version is available.

  • Libraries

    Changed gleslib.bbc and ogllib.bbc to call glLightfv by address rather than name.

  • Example Programs

    Added Newton's Cradle simulation (cradle.bbc in examples/physics).

    Bundled the set of instructive Box2D demos in examples/physics/samples (these all use Debug Draw graphics).

    Updated sudoku.bbc to add Tidy and New Game options (the difficulty of the generated game is very variable!).

This version may be downloaded, for all the supported platforms, from the usual location.  The GitHub repository has been updated (used to build the MacOS, Raspbian, Android, iOS, 64-bit Linux and in-browser editions, currently).
48
BBC BASIC / BBC BASIC for SDL 2.0 version 1.21a released
« Last post by Richard Russell on April 16, 2021, 01:41:25 PM »
I've released version 1.21a of BBC BASIC for SDL 2.0 - the cross-platform programming language for Windows, MacOS, Linux, Raspbian, Android, iOS and in-browser.  The changes in this version are as follows:
  • BASIC Interpreter / Run Time Engine

    Mapped keyboard shortcuts Cmd+A, Cmd+C, Cmd+F, Cmd+V, Cmd+X and Cmd+Z to their Ctrl equivalents for improved compatibility with Apple Macs.

    Fixed a couple of minor differences between the 32-bit x86 editions and the ARM/64-bit editions.

  • IDEs and Utilities

    Added compiler directives to SDLIDE.bbc to simplify building a standalone version in BB4W.

    Modified memusage.bbc, profiler.bbc, searchin.bbc and sdldebug.bbc to be compatible with BB4W as well as BBCSDL.

  • Libraries

    Added box2ddbg.bbc to support Box2D Debug Graphics, largely compatible with the equivalent BB4W library.

    Fixed a bug in box2dlib.bbc affecting Gear Joints on 64-bit platforms.

    Fixed a bug in dlglib.bbc causing the trackbar control not to scale to the specified range.

    Fixed a bug in treeview.bbc causing mouse clicks not to be reliably detected.

  • Example Programs

    Added pinball.bbc (in examples/physics) which demonstrates combining Box2D and 3D rendering.

    Added voronoi.bbc (in examples/graphics/) which is another shader demo.

    Modified recorder.bbc to increase the range of level adjustment (100% is now 'mid-range').

    Modified the other demos in examples/physics to take advantage of the box2ddbg library (press D to display the Debug Graphics).
This version may be downloaded, for all the supported platforms, from the usual location.  The GitHub repository has been updated (used to build the MacOS, Raspbian, Android, iOS, 64-bit Linux and in-browser editions, currently).
49
General Discussion / Re: ESP32 MicroPython
« Last post by John Spikowski on March 21, 2021, 12:49:05 AM »
I was able to get my NeoPixel stick working under MicroPython on my ESP32-PICO-D4 controller.

The picture doesn't do the color presentation any justice. Looks great live.

I can see this being used to create outdoor billboards. A string of NeoPixels to decorate a Christmas tree is another idea.

Code: Python
  1. import machine, neopixel
  2. n = 8
  3. p = 5
  4. np = neopixel.NeoPixel(machine.Pin(p), n)
  5. np[0] = (255, 0, 0)
  6. np[1] = (0, 255, 0)
  7. np[2] = (0, 0, 255)
  8. np[3] = (128, 0, 0)
  9. np[4] = (0, 128, 0)
  10. np[5] = (0, 0, 128)
  11. np[6] = (125, 204, 223)
  12. np[7] = (255, 0, 153)
  13. np.write()
  14.  

This example I converted from CircuitPython displays a rainbow effect.

NeoPixel Rainbow video clip. I hide the stick to cut down on the glare.  8)

Code: Python
  1. # MicroPython demo - NeoPixel
  2. import time
  3.  
  4. import machine
  5. import neopixel
  6.  
  7. pixel_pin = machine.Pin(5)
  8. num_pixels = 8
  9.  
  10. pixels = neopixel.NeoPixel(pixel_pin, num_pixels)
  11.  
  12.  
  13. def wheel(pos):
  14.     # Input a value 0 to 255 to get a color value.
  15.     # The colours are a transition r - g - b - back to r.
  16.     if pos < 0 or pos > 255:
  17.         return (0, 0, 0)
  18.     if pos < 85:
  19.         return (255 - pos * 3, pos * 3, 0)
  20.     if pos < 170:
  21.         pos -= 85
  22.         return (0, 255 - pos * 3, pos * 3)
  23.     pos -= 170
  24.     return (pos * 3, 0, 255 - pos * 3)
  25.  
  26.  
  27. def rainbow_cycle(wait):
  28.     for j in range(255):
  29.         for i in range(num_pixels):
  30.             rc_index = (i * 256 // num_pixels) + j
  31.             pixels[i] = wheel(rc_index & 255)
  32.         pixels.write()
  33.         time.sleep(wait)
  34.  
  35.  
  36. while True:
  37.     rainbow_cycle(0)  # Increase the number to slow down the rainbow
  38.  


50
General Discussion / Re: ESP32 MicroPython
« Last post by John Spikowski on March 18, 2021, 07:26:12 PM »
I tried to install the ESP-IDF tools on my RPi 4B running Ubuntu 64 bit.

This sucks!


jrs@RPi-Dev:~/esp/esp-idf$ ./install.sh
Detecting the Python interpreter
Checking "python" ...
/home/jrs/esp/esp-idf/tools/detect_python.sh: line 16: python: command not found
Checking "python3" ...
Python 3.8.6
"python3" has been detected
Installing ESP-IDF tools
Installing tools: xtensa-esp32-elf, xtensa-esp32s2-elf, xtensa-esp32s3-elf, riscv32-esp-elf, esp32ulp-elf, esp32s2ulp-elf, openocd-esp32
ERROR: tool xtensa-esp32-elf does not have versions compatible with platform linux-arm64
jrs@RPi-Dev:~/esp/esp-idf$



On a positive note I was able to install the ESP32 development tools on my 4 GB / 2 core @ 2.13 ghz AMD old laptop. It's running Ubuntu 20.04 64 bit OS. Runs a lot faster than my RPi 3B.

Pages: 1 ... 3 4 [5] 6 7 ... 10