BBC BASIC
« Experimental Raspberry Pi version »

Welcome Guest. Please Login or Register.
Mar 31st, 2018, 10:51pm



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
We apologize Conforums does not have any export functions to migrate data.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

Thank you Conforums members.
Cross-platform BBC BASIC (Windows, Linux x86, Mac OS-X, Android, iOS, Raspberry Pi)
BBC BASIC Resources
BBC BASIC Help Documentation
BBC BASIC for Windows Home Page
BBC BASIC Programmers' Reference
BBC BASIC Beginners' Tutorial
BBC BASIC for SDL 2.0 Home Page
BBC BASIC Discussion Group

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: Experimental Raspberry Pi version  (Read 1598 times)
michael
Full Member
ImageImageImage


member is offline

Avatar




PM


Posts: 157
xx Re: Experimental Raspberry Pi version
« Reply #1 on: Feb 17th, 2017, 01:24am »

I was planning to get a Raspberry pie . Have you tried controlling the pins on the device?
User IP Logged

I like reinventing the wheel, but for now I will work on tools for D3D
Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 803
xx Re: Experimental Raspberry Pi version
« Reply #2 on: Feb 17th, 2017, 09:26am »

on Feb 17th, 2017, 01:24am, michael wrote:
Have you tried controlling the pins on the device?

No (my RPi is in a case and the pins aren't accessible anyway). But assuming they are controllable via some documented API I can see no obvious reason why it shouldn't be callable from BBC BASIC using SYS.

Richard.
User IP Logged

Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 803
xx Re: Experimental Raspberry Pi version
« Reply #3 on: Feb 18th, 2017, 12:02pm »

Having today fully updated my Raspberry Pi 3 (rpi-update / apt-get update / apt-get dist-upgrade) I am pleased to report that the 'experimental' GL Driver (enabled in raspi-config) now works successfully with my TV, and the performance of BBC BASIC is much improved as a result. Graphics programs like 'bounce.bbc', 'chain.bbc' and 'prompter.bbc' now run at a much more acceptable speed. smiley

However true 3D programs, which rely on OpenGL, are still not working (they no longer crash, but don't display correctly). I will report back if I discover a fix.

Richard.
User IP Logged

Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 803
xx Re: Experimental Raspberry Pi version
« Reply #4 on: Mar 4th, 2017, 4:04pm »

on Feb 17th, 2017, 01:24am, michael wrote:
I was planning to get a Raspberry pie . Have you tried controlling the pins on the device?

The latest release of BBC BASIC for the Raspberry Pi comes with a new 'gpiolib' library which allows you to access the GPIO pins very easily. Here's a simple demo/test program:

Code:
      REM Simple GPIO test program for the Raspberry Pi 2, RPi 3 or RPi Zero      INSTALL @lib$ + "gpiolib"      INSTALL @lib$ + "stringlib"      REM Initialise GPIO:      gpio% = FN_gpio_setup      REM Set GPIO pins 7 to 11 inclusive to output mode:      FOR pin% = 7 TO 11        PROC_gpio_inp(gpio%,pin%) : REM Must use PROC_gpio_inp() before PROC_gpio_out()        PROC_gpio_out(gpio%,pin%)      NEXT pin%      REM Set GPIO pins 24 and 25 to input mode:      FOR pin% = 24 TO 25        PROC_gpio_inp(gpio%,pin%)      NEXT pin%      REM Enable pull-ups on GPIO pins 24 and 25:      PROC_gpio_pull(gpio%,2) : REM Select pull-up      WAIT 0      PROC_gpio_pullclk0(gpio%,&3000000)      WAIT 0      PROC_gpio_pull(gpio%,0)      PROC_gpio_pullclk0(gpio%,0)      REM Output a cycling pattern to GPIO pins 7 to 11:      previous% = %111110000000      FOR pattern% = %000000000000 TO %111110000000 STEP %10000000        PROC_gpio_clr(gpio%, (pattern% EOR previous%) AND NOT pattern%)        PROC_gpio_set(gpio%, (pattern% EOR previous%) AND pattern%)        previous% = pattern%        WAIT 20        PRINT FN_tobase(gpio%!&34 >> 7 AND %11111, 2, 5)      NEXT pattern%      END 

Richard.
User IP Logged

jbk
New Member
Image


member is offline

Avatar




PM


Posts: 12
xx Re: Experimental Raspberry Pi version
« Reply #5 on: Mar 5th, 2017, 10:22pm »

tank you Richard smiley
User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls