Date   
Re: Solved

Richard Russell
 

On Wed, Feb 6, 2019 at 06:36 PM, Leslie Baker wrote:

I then installed the three 32 bit libraries and it worked ok.

Please bear in mind that I now supply both 32-bit and 64-bit Linux editions of BBCSDL (the 64-bit edition is no longer 'experimental' as it was for a long time) so there is no longer any need to mess around with loading 32-bit libraries on 64-bit Linux.  Compatibility obviously suffers somewhat, but getting used to writing 64-bit-compatible BBC BASIC programs is no bad thing (the MacOS edition is now 64-bit only and that's the direction things are moving).

There are notes on 32-bit vs 64-bit compatibility issues in the 'differences' document here.

Solved

 

Richard & others,

I have just been attempting to install bbcsdl on another machine running Linux Mint 19 (64 bit) using the 64 bit libraries and got this error message, as has been reported by others before …

 

./bbcsdl: error while loading shared libraries: libSDL2-2.0.so.0: cannot open shared object file: No such file or directory

 

I then installed the three 32 bit libraries and it worked ok.

 

Yep, easy mistake .. Thanks again Richard .. Leslie

 


Virus-free. www.avast.com

Re: Problem with ellipsefill on Android using BBCSDL 1.00a

Richard Russell
 

On Tue, Feb 5, 2019 at 10:53 PM, Richard Russell wrote:
2. The bounding curve has a 'hole' through which the flood fill can leak (it only needs to be one pixel).
To the extent that I have been able to analyze the problem here, it would appear that this is the cause.  The question then arises: why does the bounding curve (ellipse) have holes through which the flood-fill leaks, and why is it happening on your specific Android device but not generally?  I'm pretty confident that nothing in BBC BASIC is to blame, so I fear it may point to a bug in Samsung's implementation of OpenGL ES 1.1 on your Galaxy S7 phone.

Does anybody here have a Samsung Galaxy S8 or S9?  If so, can they please check whether the 'ellipses' demo works correctly or not?

Re: BBC BASIC for SDL 2.0 v1.00a released

R.E.
 

  Yes that's what I meant to say.   I compile the prog in apk on windows.
But the Mac must be done on a Mac.
-Steve

Re: BBC BASIC for SDL 2.0 v1.00a released

Richard Russell
 

On Wed, Feb 6, 2019 at 05:02 AM, R.E. wrote:
Basically ill need to cpmpile on the Mac platform but i can move the apks to the android. 
Windows, not Mac.  BBC2APK is a 'compiled' BB4W program, it runs only on Windows.

Re: BBC BASIC for SDL 2.0 v1.00a released

R.E.
 

I get it now.  Basically ill need to cpmpile on the Mac platform but i can move the apks to the android.  So i wlll get a used Mac
   That is the simplest way in the long run

Thanks again
Ido uunderstand what i need to do.
Steve Hatch

Re: Problem with ellipsefill on Android using BBCSDL 1.00a

Richard Russell
 

On Tue, Feb 5, 2019 at 08:08 PM, Jon Welch wrote:
I will continue to investigate and report back.
I will be fascinated to learn what you finally discover the cause to be (if you do).  I can think of only three ways in which a 'flood fill to foreground' can fail:

1. The 'bounding curve' isn't precisely the same colour as the foreground colour you have specified.
2. The bounding curve has a 'hole' through which the flood fill can leak (it only needs to be one pixel).
3. The 'starting point' isn't where you intended it to be (i.e. outside rather than inside the bounding curve).

It's quite hard to understand how any of those could vary between different Android devices, especially devices sharing the same pixel format, yet that is what is happening.  I can see the attraction of programming for devices that have 'standardised' hardware, such as Apple Macs or iPhones or Xboxes, when you can be pretty confident that if your code works on one it will work on them all.  Not so Windows PCs or Android devices!

Re: Problem with ellipsefill on Android using BBCSDL 1.00a

Richard Russell
 

On Tue, Feb 5, 2019 at 08:03 PM, Jon Welch wrote:
The Pixel format is &15151002 (RGB565) and the BitsPerPixel is 16
There's no reason why that shouldn't work fine.  It's the same as most (if not all) of my Android devices.

Re: Problem with ellipsefill on Android using BBCSDL 1.00a

Jon Welch
 

Changing to GCOL 0,RND(15) exhibits the same background flash but this time, the ellipses are erased after each background flash so only the last one is visible.

The jigsaw game seems to work fine.

I will continue to investigate and report back.

Thanks for your continued support.

Re: Problem with ellipsefill on Android using BBCSDL 1.00a

Jon Welch
 

The Pixel format is &15151002 (RGB565) and the BitsPerPixel is 16

Re: Problem with ellipsefill on Android using BBCSDL 1.00a

Richard Russell
 

On Tue, Feb 5, 2019 at 02:49 PM, Richard Russell wrote:
Out of interest, what does 'getri.bbc' report for the 'Pixel format' and 'BitsPerPixel'?
Another test which might be of value is to try 'normal' plotting rather than the exclusive-or plotting that the ellipses.bbc example uses.  That is, to change GCOL 3,RND(15) to GCOL 0,RND(15) . That will bypass many of the messy SDL API calls in the ellipse library, and allow you to concentrate on the failing flood fill itself.  Incidentally, does the jigsaw.bbc example (in the games directory) work on your phone?  That makes extensive use of flood-fills so might be expected to fail too if that is where the problem lies.

Re: Can't create apksigner.jar

lettersquash <j.r.freestone@...>
 

Yes, I think I had made my account an admin one on this laptop to avoid the interruptions, but either undid it (with warnings about this from forums, etc.) or maybe just forgot to do it again when I had a complete Windows failure (well, hard-drive failure, to be fair) and had to reinstall.

I have now used the bbc2apk utility successfully, producing perfectly fine results on my tablet with a simple test graphics program. Fantastic, another amazing utility so that I can make the most of my Android devices as well as my laptop! Thank you so much.
:)
John

Re: Can't create apksigner.jar

Richard Russell
 

On Tue, Feb 5, 2019 at 02:54 PM, lettersquash wrote:
I thought my user account was an admin account
That is the default in Windows, and always has been (before the advent of UAC it was much more of a risk than it is now).  I know some people prefer not to operate that way, which does improve security, but can be inconvenient particularly during installation.  Like all 'compiled' BB4W programs, the requirement to have admin privileges only applies the very first time you run BBC2APK (as it states in the instructions), thereafter it can be run from an unprivileged user account like any other application.

Re: Can't create apksigner.jar

lettersquash <j.r.freestone@...>
 

Of course, that was an obvious error on my part. I thought my user account was an admin account, but I should have realised it wasn't when I had to go through hoops like downloading it to another location and moving it, with security prompts!
Thank you,
John

Re: Problem with ellipsefill on Android using BBCSDL 1.00a

Richard Russell
 

On Tue, Feb 5, 2019 at 02:00 PM, Jon Welch wrote:
I will experiment more and report back if I get it working.
Out of interest, what does 'getri.bbc' report for the 'Pixel format' and 'BitsPerPixel'?  I presume that you're not actually wanting to use filled, angled, ellipses in a 'real' application?  They are rarely needed, in my experience, and best avoided.  Axis-aligned ellipses (using the regular ELLIPSE and ELLIPSE FILL) statements should work reliably.

Re: Problem with ellipsefill on Android using BBCSDL 1.00a

Jon Welch
 

I have tried setting the colour to 30 and 40 as you suggest but I still get the same problem.

I will experiment more and report back if I get it working.

Many thanks for your fast response.

Re: Can't create apksigner.jar

Richard Russell
 

On Tue, Feb 5, 2019 at 12:59 PM, lettersquash wrote:
I tried bbc2apk, but get the message "Cannot create file C:\Program Files (x86)\BBCtoAPK\bin\apksigner.jar".
Since you've chosen to install it in a 'protected' location are you sure you have the required admin privileges?  The installation instructions say that you must use 'Run as administrator'; are you definitely doing that?  The message "Cannot create file" is very much pointing towards a security or privileges issue.

If you don't have sufficient privileges to write to C:\Program Files (x86), for example you prefer not to be logged in as an admin, you always have the choice of installing it in an 'unprotected' location such as C:\bbc2apk\

Re: Problem with ellipsefill on Android using BBCSDL 1.00a

Richard Russell
 

On Tue, Feb 5, 2019 at 12:05 PM, Jon Welch wrote:
Unfortunately, I am not familiar enough with the code in the ellipse.bbc library to debug this further.
The demo works fine on my Samsung Galaxy Tab S2, but I have seen this effect myself on other devices.  It probably arises from your phone using a restricted colour palette (whereas desktop PCs and iOS devices tend to use full 24-bit RGB colour, Android devices often use 16-bit e.g. RGB565).  The result of this is that the 'flood fill to foreground' (PLOT 143) can fail because the colour it is looking for doesn't exist, because it cannot be represented in 16-bits!

You can experiment with changing the colour it 'flood fills' to, but there is no guarantee of success and it could just as easily stop it working on a different device! That colour is set in the fifth line from the bottom of the library:

      SYS "SDL_SetRenderDrawColor",@memhdc%,0,0,20,&FF

Try changing the 20 to something larger (say 30 or 40) to see if it makes any difference.  As you will appreciate the 'filled ellipses' are a kludge anyway because using a flood fill is not a very satisfactory method, not least because it is so slow.  But I'm stuck with the SDL2_gfx library as the means of drawing 2D graphics and that has no filled ellipse capability at all.

It is unfortunate that the SDL2_gfx library is so limited (and what it does do it does poorly).  It's why BBCSDL has no support for drawing segments, or circles/ellipses/arcs with a specified line thickness, or polylines etc.  Only a week or so ago I was in email correspondence with its author; I think he recognises some of its limitations but he confirmed that he has no intentions of improving it.  In an ideal world I'd like to ditch SDL2_gfx entirely in favour of a better 2D graphics library, bit I don't know of one.

Re: Can't create apksigner.jar

lettersquash <j.r.freestone@...>
 

P.S. One other thought - I haven't got BBCSDL on my Windows machine, just BB4W, in case that's the problem.

Can't create apksigner.jar

lettersquash <j.r.freestone@...>
 

Hi Richard,
I've hit a problem using bbc2apk.exe. I saw your recent post about compiling BBC files for Android, and thought I'd have a go. I downloaded bbc2apk.exe, but remembered that I didn't have Java installed, so went there and installed a version of the JRE (32-bit, because that's what it advised on my system, running Firefox 32-bit on a Windows x64 ...I've no idea why I haven't got Firefox 64-bit, but that's another story). After installing JRE, I tried bbc2apk, but get the message "Cannot create file C:\Program Files (x86)\BBCtoAPK\bin\apksigner.jar".

I tried deleting and re-downloading the utility in case Java had to recognise its security signing on downloading or something, but that doesn't seem to be the case. Any idea what I'm doing wrong? Is it the wrong version of JRE, or do I need the Java development environment too, or something else? Java has a bunch of settings, including things to do with certificates, but I don't know enough about it to dare tweak them myself.
John