BBC BASIC
« What to do about the Android edition? »

Welcome Guest. Please Login or Register.
Jan 23rd, 2018, 4:25pm


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: What to do about the Android edition?  (Read 498 times)
barryem
New Member
Image


member is offline

Avatar




PM


Posts: 4
xx Re: What to do about the Android edition?
« Reply #5 on: Jan 1st, 2018, 03:34am »

I just downloaded the apk and installed it on an old Asus tablet with Android 4.2. I do have newer tablets but this was handy do I gave it a tray. All the sample programs I tried seem to work just fine. It's late and I'm old and tired so I'll look into that some more tomorrow.

What I couldn't find was any way to create or edit a program within BBC. Is that not doable? And if I have to edit my programs and transfer them to the tablet, where do I put them?

This looks like it might be fun to play with. Can you point to more info to help me get started?

Thanks,
Barry
User IP Logged

Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 692
xx Re: What to do about the Android edition?
« Reply #6 on: Jan 1st, 2018, 09:31am »

on Jan 1st, 2018, 03:34am, barryem wrote:
What I couldn't find was any way to create or edit a program within BBC. Is that not doable?

BBC BASIC assumes that you will be familiar with the common Android UI features, specifically that a 'long press' (press-and-hold) is the equivalent of a right mouse click and will often bring up a context menu. If you had tried that you would be up and running! Anyway, it's documented at the website here.

Quote:
And if I have to edit my programs and transfer them to the tablet, where do I put them?

I wouldn't necessarily recommend 'transferring' them to the Android device, because that's an overhead that can easily be avoided. Instead, you can keep the program stored on your mobile device and edit it 'remotely' using a PC; that way you benefit from the superior editing and debugging features that the 'full' IDE provides.

To do that, store your program(s) in the @usr$ directory on the Android device and mount that on your PC in the usual way, via a USB connection - just the same as you would a memory stick. The location that you need to navigate to may vary slightly between devices, but is likely to be something like:

Code:
Android/data/com.rtrussell.bbcbasic/files/ 

Richard.
User IP Logged

barryem
New Member
Image


member is offline

Avatar




PM


Posts: 4
xx Re: What to do about the Android edition?
« Reply #7 on: Jan 1st, 2018, 1:50pm »

I posted my question late last night before I found the page on Touch IDE. So far, of the programs within BBC Basic for Android that I've tried that's the only one that wouldn't run. I have a few other, newer tablets so I'll try it on them.

I did a little playing around with BBC4W years ago and I don't remember much about it. I do remember being kind of impressed with just how much it does. I'm an old programmer living in a retirement home with not a lot to do so I like playing with stuff like this. My ability to focus isn't what it used to be so I'm fairly useless these days but it's fun and on a tablet it would especially be fun. Especially if I could code simple stuff right on the tablet.

Anyway I'll play around with it some more. Thank you for the pointer to the page on Touch IDE.

Barry
User IP Logged

barryem
New Member
Image


member is offline

Avatar




PM


Posts: 4
xx Re: What to do about the Android edition?
« Reply #8 on: Jan 1st, 2018, 3:21pm »

Okay I got into the editor. It hadn't occurred to me to press and hold on the source file but lots of trying different things finally got me there. After doing that I realized that your mention of that in your post was a hint but it wasn't quite enough. Can I suggest a page of simple instructions somewhere to help us old guys get started?

I looked for a way to start my own program or to copy one of the existing programs but I didn't find anything. Can you give me a hint? Or even just tell me how to do it? smiley

I remember enough about BBC4W to figure out that this is a powerful interpreter but I don't know how to do anything with it. I did see some assembly code embedded if it was an X86 CPU. Can ARM assembly be used? Is there X86 emulation on a tablet with an ARM CPU or is that for X86 tablets only?

Another question: if I install BBC4W on my Windows laptop (I have a license) will I be able to use the help in that to create a small program in the tablet? My interest is only in small programs. I haven't written anything more than a about a hundred lines long in years. Even that's difficult for me these days.

Yet another question: where are the graphics these sample programs use?

From where I sit it looks like you have a pretty powerful tool here and if there's a lack of interest my guess is that it's because of lack of information. I'll bet a lot of us old, formerly smart programmers would love to have something like this to play with as we sit in our rocking chairs. smiley

I can help a little with the testing on various tablets. So far I've installed it on 2 tablets:

an Asus ME173X tablet with Android 4.2.2 with a MediaTek MT8125 CPU. It seems to work just fine.

a Samsung Galaxy Tab A with S Pen (SM-P580) with Android 7.0. All I can find out about the CPU is that it's Octa-core.

I have a few other tablets I can install it on and test it once I figure out more about how to use it. Most are a couple of years old or more. They're made by Asus, Lenovo and Acer. I also have a new Amazon Fire 7" tablet I can try it on.

Barry
User IP Logged

Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 692
xx Re: What to do about the Android edition?
« Reply #9 on: Jan 1st, 2018, 4:16pm »

on Jan 1st, 2018, 3:21pm, barryem wrote:
Can I suggest a page of simple instructions somewhere to help us old guys get started? I looked for a way to start my own program or to copy one of the existing programs but I didn't find anything.

I'm really confused now. At the web page to which I linked there's a whole section entitled "Creating a new program" which has step-by-step instructions (four bulleted points). In what way does that not meet your needs?

Quote:
Can ARM assembly be used?

Yes, but I'd be interested to learn why you think you might want to. BBCSDL is a 'cross platform' version of BBC BASIC, the idea being that programs you write will work equally well on Windows, Linux (x86), Mac OS, Android and Raspberry Pi. Obviously as soon as you incorporate any assembler code this ceases to be true (unless you go to the trouble of including source code for every CPU, which could mean at least four different versions in the future).

I went to a lot of trouble, not so long ago, to port David Williams's prizewinning 'Forces of Darkness' game and his old 'Xmas Demo II' demonstration to BBCSDL, in both cases using 100% cross-platform BBC BASIC code with no assembler. I had hoped that users would conclude that needing assembler code is highly unlikely, but you don't seem to have.

Quote:
if I install BBC4W on my Windows laptop (I have a license) will I be able to use the help in that to create a small program in the tablet?

Well, not knowing your level of skill or experience with BBC BASIC it's hard for me to speculate. Certainly the differences between BB4W and BBCSDL are sufficiently small that you can use the same Help file (so long as you ignore the obviously platform-specific sections); there isn't any other! The most significant difference is probably the way the *FONT command works; I have discussed that here previously.

Quote:
Yet another question: where are the graphics these sample programs use?

As with BB4W, they are generally loaded from the @dir$ directory, i.e. the same place as the program itself resides. Sometimes, especially when there are a lot of resource files, they are in sub-directories to reduce clutter.

Richard.
User IP Logged

barryem
New Member
Image


member is offline

Avatar




PM


Posts: 4
xx Re: What to do about the Android edition?
« Reply #10 on: Jan 1st, 2018, 5:37pm »

Somehow I managed to miss the adding new programs part of the Touch IDE page. I'll read that and give it a try.

As for ARM assembly I have no real reason for using it, or X86 assembly either. I'm looking at BBC for Android as something to play with. I do have some X86 tablets, also. I've done a lot of X86 assembly, although none in the past decade or two so it'll probably be nearly as alien to me as ARM assembly, which I've never done. It might be fun to learn a bit of it just to see what RISC programming is about. Does the term RISC still apply?

My question about BBC4W help files was just a general one. I try to avoid installing software without a reason. If the help will give me a fairly good guide for the basics it'll be worth it to me.

My experience with BBC4W is very small. I wrote a few simple games a few years ago in it for use in the community room of my retirement home. They were very simple.

Anyway, thank you for creating this. I'm going to have some fun with it. I'm already having some fun with it. It's a very nice toy and it kind of looks like with a more sophisticated interface it might be a money maker. I'm surprised you aren't doing that, or is that your plan?

I played around a couple of years ago with Mintoris Basic on Android, another nice tool. His focus in his forum is strictly on advanced programming. I wonder if a language like this might have more success if there was a focus on user written games and tools, made available in a free app store within the interface itself. Then people could buy the program, run the games and programs others have written and have a lot of fun and maybe even learn to program it.

By the way, i did install this on my 7" Amazon Fire tablet, the current model, and mostly it ran just fine. On one of the games, Dibbly, when I ran the demo, near the end of the demo I got a Number too big error. The same thing happened on my Asus ME173. It worked fine on my Galaxy Tab A, which has Android 7. The others run Android 4.2. I'm not sure if that matters but it might be useful to you. If you want me to run any kind of test to help you pinpoint the problem I'll be happy to. The Fire tablet is $50 in the USA and often goes on sale for $40 or even $30.

Ebay has an Asus ME173 for $35 in the USA. It's an old, now slow tablet that's fairly useless these days so they probably can be had for even less with a bit of shopping. I had 2 of them and recently sold my other one for $3. smiley

Barry
User IP Logged

Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 692
xx Re: What to do about the Android edition?
« Reply #11 on: Jan 1st, 2018, 6:12pm »

on Jan 1st, 2018, 5:37pm, barryem wrote:
I got a Number too big error.... Android 4.2.

I believe that's a known Android bug (in the C run-time library), and not anything to do with BBC BASIC. As you have found, it's fixed in more recent versions.

Richard.
User IP Logged

roy
New Member
Image


member is offline

Avatar




PM


Posts: 6
xx Re: What to do about the Android edition?
« Reply #12 on: Yesterday at 07:51am »

wow Richard, this as come a long way since I last looked at it. Now works good on my new and old tablets.

In the demos 2 apps give the number to big error and Touchide.bbc didn't run.
I thought the number to big error may be cause with not enough memory on my device.

I typed in my own short app and it runs well.

Well done.

Regards Roy

edit: Just had another go with the demos and it is just my old tablet the gives the number to big error.
« Last Edit: Yesterday at 08:09am by roy » User IP Logged

Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 692
xx Re: What to do about the Android edition?
« Reply #13 on: Yesterday at 08:20am »

on Yesterday at 07:51am, roy wrote:
2 apps give the number to big error

Which ones, and what do you need to do to provoke the error? Where does the error occur (you may need to make a copy of the program and add line numbers to find out)?

Quote:
and Touchide.bbc didn't run.

It must have - it's the program that runs initially when you open the app, and to which it returns when you exit each of the demos. If you run it 'manually' - which really there's little point in doing - you may not see much difference (because it's the program that you were running anyway) but it certainly should run.

I think this is quite well known, but to emphasise: BBCSDL contains no integrated IDE, it's just the interpreter. Its native interface is simply 'immediate mode', as with most other versions of BBC BASIC (e.g. on the BBC Micro, Acorn Archimedes, MS-DOS etc.). The only reason you see anything different is because it's automatically running a BASIC program (touchide.bbc in the case of the Android edition, bbcsdl.bbc when running on a desktop).

Try running 'touchide.bbc' on a desktop platform, like Windows, to see it in that environment (you can operate it with a mouse).

Richard.
User IP Logged

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