BBC BASIC
« BBC BASIC for SDL 2.0 v0.19a released »

Welcome Guest. Please Login or Register.
Jan 20th, 2018, 6:08pm


Cross-platform BBC BASIC (Win32, Linux x86, Android, Mac OS-X, Raspberry Pi)

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: BBC BASIC for SDL 2.0 v0.19a released  (Read 365 times)
Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 689
xx BBC BASIC for SDL 2.0 v0.19a released
« Thread started on: Nov 1st, 2017, 4:35pm »

I've updated BBCSDL, the free cross-platform implementation of BBC BASIC, to version 0.19a. The various editions may be downloaded as follows:The Android edition will also run on the Amazon Fire TV Stick.

The main changes in this version are as follows:

BASIC interpreter:
  1. The *DISPLAY command will flip the image horizontally or vertically, for compatibility with BB4W v6.11a.

  2. The *INPUT and *OUTPUT commands are now supported in the ARM version (i.e. on the Raspberry Pi).

  3. A minor bug affecting the 'copy key' functionality has been fixed.

Libraries:
  1. The socklib library has been added, supporting network access. This is substantially compatible with the BB4W version.

  2. The dlglib library has been updated to support dragging dialogue boxes.

Example Programs:
  1. banner.bbc has been updated to display news from the BBC's RSS feed, like the BB4W version.

  2. ceefax.bbc has been added, which emulates a teletext news magazine, sourced from the BBC's RSS feeds.

  3. client.bbc and server.bbc have been added, which use socklib to implement a simple chat application.

  4. pyramid.bbc generates its own FVF files, making it a much more useful example.

  5. widor.bbc, a transcription from 1981 of the Toccata from Widor's Organ Symphony No.5, has been added.

IDEs:
  1. Andy Parkes' BBCEdit will now run on the Raspberry Pi.

  2. The Raspberry Pi edition of SDLIDE now supports the Run... Profile and Run... Debug facilities.

  3. SDLIDE dialogue Boxes (such as Open File or Find/Replace) can be dragged to a different location.

  4. The SDLIDE Find/Replace facility wraps back to the start of the program if the string isn't found.

  5. Double-clicking on a word in the SDLIDE editor highlights that word wherever it appears in the program.

I still need volunteers to contribute to the documentation, help viewer and addin utilities.

Richard.
« Last Edit: Nov 2nd, 2017, 2:53pm by Richard Russell » User IP Logged

michael
Full Member
ImageImageImage


member is offline

Avatar




PM


Posts: 141
xx Re: BBC BASIC for SDL 2.0 v0.19a released
« Reply #1 on: Nov 2nd, 2017, 02:31am »

Richard, RETROLIB 10(BBC4W) and RETROLIB core (for SDL) have become very popular, useful tools. With a combined user interest of over 2300 just on the BBC4W forum, I would offer "RETROLIB core.bbc" for BBCSDL since I use it for my mac and Raspberry Pi.


Also, "RETROLIB core.bbc" is truly cross platform and is a stand alone library. (no speech)

Here is "RETROLIB core.bbc":

https://1drv.ms/u/s!AmYwmTjbmULXlzOEjLGnFQbcM5V3

And here is the Reference:

https://1drv.ms/t/s!AmYwmTjbmULXlzXmQZ126ZzHAaWw

Of course, if you feel it needs more refining I can look at the code.
« Last Edit: Nov 2nd, 2017, 03:11am by michael » 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: 689
xx Re: BBC BASIC for SDL 2.0 v0.19a released
« Reply #2 on: Nov 2nd, 2017, 2:08pm »

on Nov 2nd, 2017, 02:31am, michael wrote:
Here is "RETROLIB core.bbc"

I've downloaded the program and, as an initial evaluation, run the Cross Reference Utility on it. I'm afraid it reports many problems, not least large numbers of 'Shared variables which are not globals' and 'Shared static variables' warnings, making it entirely unsuitable as a library in its current form.

A brief glance at the program also shows that there is some wasteful (and therefore potentially slow) code. For example consider this:

Code:
      DEF PROCfcolor(co$)
      LOCAL rcol%
      rcol%=FNstcorecol(co$)
      GCOL rcol%
      ENDPROC 

The LOCAL variable rcol% appears to have no purpose other than to add bloat to the program and to slow it down. It can be trivially eliminated as follows:

Code:
      DEF PROCfcolor(co$)
      GCOL FNstcorecol(co$)
      ENDPROC 

One then has to ask the question: does this really add any clarity compared with incorporating the GCOL statement inline:

Code:
      GCOL FNstcorecol(co$) 
.
I would also want to query PROCresetrgb which, unless I'm being particularly thick, appears to reproduce in a very long-winded way almost the same functionality as VDU 20, i.e. it resets the palette to its default colours. On a very quick test, PROCresetrgb is 18 times slower than VDU 20!

I admit to not having studied the rest of the code in any detail - these are just things that jumped out at me on a very brief scan. They are not things that would necessarily be of any concern in a user's program, but if you are proposing it as a library that can be used with confidence by other people, it needs a lot of attention.

Richard.
« Last Edit: Nov 2nd, 2017, 2:47pm by Richard Russell » User IP Logged

michael
Full Member
ImageImageImage


member is offline

Avatar




PM


Posts: 141
xx Re: BBC BASIC for SDL 2.0 v0.19a released
« Reply #3 on: Nov 3rd, 2017, 01:46am »

[quote]does this really add any clarity compared with incorporating the GCOL statement inline:/quote]

Just optional. I added commands as it seemed useful.

In the end PROCcolor("f/b","number or word or rrr,ggg,bbb") became my preferred tool since it had flexibility.

( I am resorting to using COLOUR c,r,g,b and GCOL c , directly in my procedures and functions more now as it is faster, but if speed is not crucial, I use PROCcolor. )

example: PROCcolor("f","white"):REM foreground white
or
PROCcolor("b","white"):REM sets background white

or "200,100,050" - as a colour or "0-15 base colours"

For me its just a nice tool.

Here is the code for resetting the palette: (from help docs):

Code:
FOR N = 0 TO 15
  VDU 19,N,N,0,0,0
NEXT N

VDU 20

 


**>: (I worked out the kinks -took about 2 1/2 hours.. My old code was really bad code.. Good thing I went over it and modernized it).

Also, here is the fixed library:

https://1drv.ms/u/s!AmYwmTjbmULXlzx3fYvCY194f7if

The only cross reference notes are within FNword:

Alphabet$
and
Space$

But I am absolutely certain that is not an issue...

I have done a few tests including, trying it on RETROLIB 10 demo and on BUTTON SUITE.

I will do more tests and let you know when I am absolutely sure everything is 100%

« Last Edit: Nov 3rd, 2017, 06:10am by michael » User IP Logged

I like reinventing the wheel, but for now I will work on tools for D3D
Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

Donate $6.99 for 50,000 Ad-Free Pageviews!


This forum powered for FREE by Conforums ©
Sign up for your own Free Message Board today!
Terms of Service | Privacy Policy | Conforums Support | Parental Controls