Topics

Testers wanted

Richard Russell
 

I am developing a software tool which will automatically convert a BBC BASIC program to an Android app. My objective is to make it as straightforward to create an APK file for Android as it is to create an EXE file for Windows using BB4W! Enough of it is working to give me confidence that I will succeed: here is an APK for David Williams' Forces of Darkness game that I made this way (40 Mbytes):

http://www.rtr.myzen.co.uk/FOD.apk

Because the user-interface is such an important aspect of the program I would like to invite people to try it out and give me their feedback before it is formally released. The prerequisites are that you must have written a BBC BASIC program which you have confirmed works on an Android device (using BBCSDL), and that you have a relatively modern Windows PC which has Java 1.7 or later installed (or on which you are happy to install Java).

If you would like to volunteer let me know.

Richard.

Storer, Darren
 

Hi Richard,

This is exciting news!

Yes, I would like to test the Androip app converter and I confirm that I have all the prerequisites.

Many thanks

Darren

On 12 February 2018 at 00:44, Richard Russell <news@...> wrote:
I am developing a software tool which will automatically convert a BBC BASIC program to an Android app. My objective is to make it as straightforward to create an APK file for Android as it is to create an EXE file for Windows using BB4W! Enough of it is working to give me confidence that I will succeed: here is an APK for David Williams' Forces of Darkness game that I made this way (40 Mbytes):

http://www.rtr.myzen.co.uk/FOD.apk

Because the user-interface is such an important aspect of the program I would like to invite people to try it out and give me their feedback before it is formally released. The prerequisites are that you must have written a BBC BASIC program which you have confirmed works on an Android device (using BBCSDL), and that you have a relatively modern Windows PC which has Java 1.7 or later installed (or on which you are happy to install Java).

If you would like to volunteer let me know.

Richard.


Paul Marshall
 

On Sun, Feb 11, 2018 at 04:44 pm, Richard Russell wrote:
you must have written a BBC BASIC program which you have confirmed works on an Android device (using BBCSDL),

I have only one such program (apart from Dibley) but I would be pleased to volunteer as a tester.  I'm on Java 1.8.

There is another program on the way, it works in SDL but I have to convert some right mouse clicks into some other gesture.
Paul.

Richard Russell
 

On Mon, Feb 12, 2018 at 01:43 am, Paul Marshall wrote:
I have to convert some right mouse clicks into some other gesture.
Most commonly this is 'long press' (press and hold).

The BBC2APK tool isn't ready yet but I'll be in touch when it is.

Richard.

J.G.Harston
 

Richard Russell wrote:
If you would like to volunteer let me know.
I've just done a refresh of my BB4W and BBCSDL on my laptop and my Android thingy to test coding on it. The programs I've been testing work so far in the main, but there are a few issues mainly with the environment they are running in.

A few of some of them expect command line parameters (eg AsmPDP). I've been trying to write a sort-of shell so these programs can be given parameters to run with.

Most expect that *Quit takes you back to somewhere where you can run another program, or to a caller.

It's frustrating that *Quit takes me back to the Android main screen and I have to re-run Basic, I've just accidently done it again just now when testing. It then means having to restart Basic and trekking all the way through the filesystem to find my files again.

My file picker defines a key to re-CHAIN itself in a similar way that the ones supplied do, but it's so easy to forget to press it and stop your muscle memory typing *Quit, and that's no help for programs that are coded to exit with *Quit. It's not a very satisfactory solution to rewrite everything to include something like:

IF on this one envirotnment THEN do something complicated ELSE *Quit

It would be more useful if *Quit could be definable to do something specific to the platform so it could configured to do, eg, 'sdlbbc path\to\myfilepicker.bbc'. Then I would be back to an environment where I could continue navigating and selecting/editing/running programs. Comparable to working on a desktop where you effectively get back to a filer window where you can continue navigating, or even old-style returning to a command prompt and continue *DIR, *CAT, LOAD, RUN, etc.


Another annoyance is that *Quit takes me back to some unknown part of the filesystem that I have to navigate out of to find my files, though this is probably an Android issue. I have to go to @usr\..\..\..\..\ to find the visible part of the filesystem.

I transfered a bunch of code onto my tablet by plugging it into my PC as a storage device and copying things to \Downloads\Basic. However, when Basic starts I have to navigate out of where it starts to find \Downloads\Basic, and when I forget and use *Quit to exit a program I have to go all the way through again. I tried to copy my files into where Basic starts up, intending to add a 'mycode' directory to 'examples', but it I can't find its location. It seems to be "above" the root directory that is visible when transfering data over. I can navigate to it on the tablet with the various BBC BASIC file pickers, but can't navigate to it from an environment where I can copy and move files around.

--
J.G.Harston - jgh@... - mdfs.net/jgh

Richard Russell
 

On Mon, Feb 12, 2018 at 06:26 am, J.G.Harston wrote:
Most expect that *Quit takes you back to somewhere where you can run another program, or to a caller.
I never use *QUIT (in fact I'd forgotten that the command even existed) because it's synonymous with the QUIT statement in BASIC.  In the official RISC OS manual for BBC BASIC the action of the QUIT statement is specified as "leaves the BASIC interpreter" which is exactly what it does in both BB4W and BBCSDL.

If the interpreter has been invoked from an IDE then it's reasonable that QUIT should return to the IDE, which again is exactly what it does in BB4W and the desktop editions of BBCSDL.  If it's been invoked from a command prompt, QUIT returns to the command prompt.  But when BBC BASIC has been invoked from the desktop QUIT returns to the desktop, and since it's the only way it can be invoked in Android that's what happens!

> It would be more useful if *Quit could be definable to do something specific to the platform

I don't see how it could ever do anything "different" from exiting the interpreter; you can't even assume that the interpreter is in a 'fit state' to do anything else (the QUIT might have been issued from a 'fatal error' handler). The responsibility for what happens after the QUIT properly belongs to the program that invoked the interpreter in the first place. In an ideal world the Android edition of BBC BASIC would work the same way as the desktop editions, in which the IDE runs as a separate process, but I've no idea how to do that or indeed whether it is even possible.

Quit takes me back to some unknown part of the filesystem

It doesn't take you "back" anywhere because Android doesn't have the concept of 'current directory'. That's why all paths need to be absolute (i.e. typically prefixed with @dir$, @lib$ etc.) in an Android-compatible BBC BASIC program.

Richard.

 

I would very much like to do this kind of thing. I don’t yet have the Android device I’ll be using (the Gemini PDA, on its way to me from China) but once I do and I have figured out how to use Android, I have any number of things I’d like to make into Android apps. So I’ll watch this space.

Richard Russell
 

On Mon, Feb 12, 2018 at 01:43 am, Paul Marshall wrote:
I have only one such program (apart from Dibley) 
Here's an APK of Dibley made using the new tool in its incomplete state:

  https://www.dropbox.com/s/muu8sr9ffurjweg/dibley.apk?dl=0

It was actually a valuable test because it showed that the Java tool I am using can't cope with files or directories starting with a 'dot' (which the resources directories .Demo, .Graphics and .Levels do in their BBCSDL forms).  I had to get rid of the dots to allow the APK to build; no great hassle but certainly something to be aware of.

Richard.

Paul Marshall
 

On Mon, Feb 12, 2018 at 01:45 am, Richard Russell wrote:
Most commonly this is 'long press' (press and hold).
This is a bit more challenging but that is all part of the fun - I have some controls which are decremented by a left-click and incremented by a right-click so I intend to make it work by dragging up & down. Other than that it was all quite straightforward!

Paul Marshall
 

Brilliant!  Confirmed it downloads, installs and opens on my Android tablet in seconds with minimal effort. The icon looks good too.
This is a major step forward, thanks Richard.

>  I had to get rid of the dots
I never did understand why they were there.

Richard Russell
 

On Tue, Feb 13, 2018 at 01:13 am, Paul Marshall wrote:
I never did understand why they were there.
I explained it at the time.  It's a standard feature of Linux (and most derived operating systems) that a file or directory name starting with a dot is 'hidden'; it's  equivalent to the 'hidden' file attribute in Windows.  If you don't want the user to see a file or directory, because it might be distracting or suggest that he can select or interact with it when he can't, it's a very useful feature.  In the specific case of BBCSDL it ensures that the 'touchide' menus are not cluttered with resource directory names that are of no relevance to the user and might cause confusion.  It's very important, in my opinion.

Richard.

Robin Hodson
 

In case it helps, out of curiosity I tried FOD.apk
on my HTC m7 One, Android v5.0.2.

The title graphics come up, then there's a pause of
a few seconds, then it stops with String too long.

The onscreen keyboard pops up and I can type.

Back triggers Escape, *fx0 does nothing but *help gives
BBC BASIC for Android version 0.20a.

ERL is 0
LIST produces Mistake


---
This email has been checked for viruses by AVG.
http://www.avg.com

Richard Russell
 

On Tue, Feb 13, 2018 at 10:37 am, Robin Hodson wrote:
The title graphics come up, then there's a pause of
a few seconds, then it stops with String too long.
That's very surprising; it's hard to understand how it could work on most devices but not on yours.  Just so I understand exactly what you are seeing, when you say "title graphics" do you mean it gets as far as the menu screen (the one that has the checkboxes for Demo mode and SoundFX etc.) and then fails when you tap to run the game?  If not, it would be helpful if you could be more precise. 

Richard.

Robin Hodson
 

On 13/2/2018 1910, Richard Russell wrote:
On Tue, Feb 13, 2018 at 10:37 am, Robin Hodson wrote:

The title graphics come up, then there's a pause of
a few seconds, then it stops with String too long.

That's very surprising; it's hard to understand how it could work on
most devices but not on yours.  Just so I understand exactly what you
are seeing, when you say "title graphics" do you mean it gets as far as
the menu screen (the one that has the checkboxes for Demo mode and
SoundFX etc.) and then fails when you tap to run the game?  If not, it
would be helpful if you could be more precise.
I attach a screenshot.


---
This email has been checked for viruses by AVG.
http://www.avg.com

Robin Hodson
 

On 13/2/2018 1910, Richard Russell wrote:
On Tue, Feb 13, 2018 at 10:37 am, Robin Hodson wrote:

The title graphics come up, then there's a pause of
a few seconds, then it stops with String too long.

That's very surprising; it's hard to understand how it could work on
most devices but not on yours.  Just so I understand exactly what you
are seeing, when you say "title graphics" do you mean it gets as far as
the menu screen (the one that has the checkboxes for Demo mode and
SoundFX etc.) and then fails when you tap to run the game?  If not, it
would be helpful if you could be more precise.
Apparently I can't attach a screenshot directly, so here's an
online file (after much ftp fumbling) :

http://chipshed.org/halfsize.jpg


---
This email has been checked for viruses by AVG.
http://www.avg.com

Richard Russell
 

On Tue, Feb 13, 2018 at 11:46 am, Robin Hodson wrote:
Apparently I can't attach a screenshot directly, so here's an
online file (after much ftp fumbling) :
That's the splash screen!  So it would suggest it isn't even getting as far as running the program itself.  I don't know how much diagnostics you are prepared to engage in, but extra information that would be helpful would be the values of PAGE, LOMEM, END and HIMEM:

      PRINT PAGE'LOMEM'END'HIMEM

Richard.

Robin Hodson
 

PRINT PAGE'LOMEM'END'HIMEM
4396800
4397798
4397798
6493952
>


---
This email has been checked for viruses by AVG.
http://www.avg.com

Richard Russell
 

On Tue, Feb 13, 2018 at 12:32 pm, Robin Hodson wrote:
4396800
The failure is apparently happening when the main program 'Fod.bbc' is CHAINed, and the 'String too long' message makes me wonder whether for some reason the file paths are exceptionally long on your device - perhaps the file-system hierarchy is deeper than usual.   To test that hypothesis, which I'm by no means confident of, I've rebuilt FOD.apk with a larger path name buffer.  Perhaps you would be kind enough to download it (from the same link as before) and let me know if it makes any difference.

Richard.

Robin Hodson
 

On 13/2/2018 2223, Richard Russell wrote:
> On Tue, Feb 13, 2018 at 12:32 pm, Robin Hodson wrote:
>
> 4396800
>
> The failure is apparently happening when the main program 'Fod.bbc' is
> CHAINed, and the 'String too long' message makes me wonder whether for
> some reason the file paths are exceptionally long on your device -
> perhaps the file-system hierarchy is deeper than usual. To test that
> hypothesis, which I'm by no means confident of, I've rebuilt FOD.apk
> with a larger path name buffer. Perhaps you would be kind enough to
> download it (from the same link as before) and let me know if it makes
> any difference.


Still says "String too long" as before.

Not much difference with memory pointers:

>PRINT PAGE'LOMEM'END'HIMEM
4396800
4397793
4397793
6493952
>

I know the APK file is different because the filesize is different.
vers1: 40,929,490 bytes
vers2: 40,774,645 bytes



---
This email has been checked for viruses by AVG.
http://www.avg.com

Richard Russell
 

On Wed, Feb 14, 2018 at 06:51 am, Robin Hodson wrote:
Still says "String too long" as before.
Yes, thanks, David Nichols confirmed that as well in another thread.  I've put my utility on the back burner because it's obviously seriously broken, and I have no idea what the cause is.  It's a good thing I found out about this before releasing it, you have saved me some embarrassment!  I've now deleted FOD.apk.

Richard.