Date   
Re: Testers wanted

Robin Hodson
 

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


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

Re: Testers wanted

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.

Re: Bedstead font

Storer, Darren
 

Thanks Richard,

I'm on my travels for a couple of days but I will try your suggestion once I return home.

Regards

Darren


On 13 February 2018 at 10:50, Richard Russell <news@...> wrote:
On Tue, Feb 13, 2018 at 12:47 am, Storer, Darren wrote:
I've been trying in vain to run MODE 7 routines (mostly PC platform but later to run on Android) in full screen. 
Try this, at least as a basis for experimentation (BBCSDL only):

      MODE 7
      SYS "SDL_SetWindowFullscreen", @hwnd%, &1001
      VDU 26
      IF POS REM SDL thread sync
      @zoom% = &8000 * @vdu%!212 / 500
      @panx% = 320 - 250 * @vdu%!208 / @vdu%!212
      PRINT CHR$131 "This is a MODE 7 full height display."
      PRINT CHR$134 "In Windows press Alt-F4 to terminate."
      FOR row% = 2 TO 24
        PRINT TAB(0,row%) CHR$133 "Row ";row%;
      NEXT
      REPEAT
        WAIT 1
      UNTIL FALSE

Richard.


Saving an area of the screen

Paul Marshall
 

On the Archimedes I would often use use the Sprite graphics system to place bitmaps on the screen, selecting with *SCHOOSE and usually plotting with PLOT&ED. I could save the background screen to a temporary sprite with *SGET temp so it could be used later to 'remove' the graphic object..
On BB4W and BBCSDL my workaround is to save the graphics as separate bitmap files and plot them with *DISPLAY.  Likewise I can save the background to a file with *SCREENSAVE. My Dibley program works this way, it works well and is a simple conversion.
I am a bit uneasy about using the hard drive in this way instead of keeping the bitmaps in memory. On a tablet/phone it is almost certainly solid state so doesnt matter, and it may be cached somewhere anyway but I wondered if this is the best way handle the bitmaps. Any thoughts? 

Dibley

DaveinSpain
 

I have downloaded the "Dibley" app and get the same results on the splash screen. Error message is "String too long"

PAGE 4396800
LOMEM 6493952
END 4397798
HIMEM 4397798

I will try to send you a picture.
Dave N

On Feb 13, 2018 20:59, Richard Russell <news@...> wrote:
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.

Re: Saving an area of the screen

Richard Russell
 

On Wed, Feb 14, 2018 at 01:52 am, Paul Marshall wrote:
I am a bit uneasy about using the hard drive in this way
If you use a *GSAVE/*DISPLAY pair to move a block of graphics the 'round trip' will simply be via cache RAM, not your hard drive.  Indeed if you repeat it sufficiently frequently, using the same filename, the bitmaps may never make it onto your disk at all, except the last of course!

Nevertheless there is an alternative method you can use when you know that your window is sufficiently smaller than the backing bitmap (which is usually 1920 pixels wide) that there is enough 'off screen' area into which to move your block.  In that case you can use RECTANGLE ... TO copy the block from the visible area into the off-screen area, and then another one to copy it back (either to the same place or somewhere different).  This is exactly the technique I use in the recent 'penrose.bbc' demo to save and restore the region behind the 'ball' sprite.

However you really need to wean yourself off any technique that involves copying a region of the screen, because it is likely to be very slow.  All modern graphics cards are optimised for rendering, and support for moving bitmap data in the opposite direction (i.e. from the screen to your program) is limited and slow.  Although it may be counter-intuitive, redrawing the entire screen every frame is likely to give the best performance, because that's how modern programs are expected to work.

David Williams' Forces of Darkness game is an excellent example: every frame is redrawn from scratch (using GFXLIB routines in BB4W and native SDL functions in BBCSDL) which may seem an awful lot of work compared with animating just the moving 'sprites', but it can achieve frame rates of 50 fps or so even on a relatively slow platform like the Raspberry Pi.

Richard.

Re: Dibley

Richard Russell
 

On Wed, Feb 14, 2018 at 03:17 am, daveinspain101 wrote:
I have downloaded the "Dibley" app and get the same results on the splash screen. Error message is "String too long"
OK, so clearly my 'BBC2APK' tool for creating an Android app from a BBC BASIC program isn't working.  It was a nice idea, but you can't win them all.

Presumably you can still run Dibley OK from BBCSDL itself?

Richard.

Re: Dibley

DaveinSpain
 

Only two of us so far, Richard. How many have played either of them successfully and not reported that they worked? And yes, Dibley plays fine with BB4Android!

|... but you can't win them all

Why not? Don't give up just yet, if anyone can, you can!

Dave N

On Feb 14, 2018 14:04, Richard Russell <news@...> wrote:
On Wed, Feb 14, 2018 at 03:17 am, daveinspain101 wrote:
I have downloaded the "Dibley" app and get the same results on the splash screen. Error message is "String too long"
OK, so clearly my 'BBC2APK' tool for creating an Android app from a BBC BASIC program isn't working.  It was a nice idea, but you can't win them all.

Presumably you can still run Dibley OK from BBCSDL itself?

Richard.

Re: Dibley

Richard Russell
 

On Wed, Feb 14, 2018 at 05:47 am, daveinspain101 wrote:
Don't give up just yet,
It's not a case of 'giving up', it's a case of not having a clue!  I had hoped that my hypothesis about the size of the file path buffer might be right, but although the OP hasn't responded it appears from your report that it hasn't helped.

Richard.

Re: Dibley

Paul Marshall
 

Dibley is installing and running fine on my tablet, phone and Android TV. 

The only issue is on the TV with it's keyboard pressing Escape gives a 'File or path not found" error. That would normally run the touchide so I need to revise the exit strategy. 
  

Re: Dibley

Richard Russell
 

On Wed, Feb 14, 2018 at 06:20 am, Paul Marshall wrote:
pressing Escape gives a 'File or path not found" error.
Needless to say, this was simply intended as a quick demo of my (it appears broken) utility to create an APK from a BBC; I didn't make any changes to Dibley.bbc.  Typically you are going to need to adapt a program before it is suitable as a standalone app, not least that there ought to be no way for it to 'quit' (or exit to immediate mode).  Android apps never 'terminate' as such, other than through the user 'force closing' them, and indeed if you allow a BBC BASIC program to quit you will end up with a 'zombie' process still running in the background.

And before anybody (JGH?) says that they think it should be the responsibility of BBC BASIC itself or of the BBC2APK utility 'automatically' to modify the behaviour of the program from how it works when run from the IDE, I totally disagree!

Richard.

Re: Testers wanted

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

Re: Testers wanted

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.

Re: Dibley

Richard Russell
 

On Wed, Feb 14, 2018 at 06:05 am, Richard Russell wrote:
It's not a case of 'giving up', it's a case of not having a clue!
Can you try Dibley again, please (same link as before, you may need to clear your cache to guarantee picking up the new version)?  I have an inkling as to what may be going on, and I've made a trivial change to the code which will indicate whether I'm on the right track or not.

Richard.

Re: Testers wanted

 

I downloaded the FOD.apk and it worked perfectly, although it was a little slow to load everything.

I was using a OnePlus 2

 

I don’t know if that helps. Maybe I should try with Dibley, too.

 

Chris Fry
Barcelona

 


From: bb4w@groups.io [mailto:bb4w@groups.io] On Behalf Of Richard Russell
Sent: Wednesday, February 14, 2018 4:06 PM
To: bb4w@groups.io
Subject: Re: [bb4w] Testers wanted

 

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.

Re: Testers wanted

Richard Russell
 

On Wed, Feb 14, 2018 at 09:29 am, Chris Fry wrote:
I don’t know if that helps.
Unfortunately knowing that it works doesn't help at all -  it works on all my devices too!  I am waiting to hear whether my recently modified 'dibley.apk' fixes the problem for those who are suffering it, i.e. Robin Hodson and David Nichols.  If it does I will at least have a workaround, but if not I'm as much in the dark as ever.

Richard.

Re: Saving an area of the screen

Paul Marshall
 

On Wed, Feb 14, 2018 at 04:59 am, Richard Russell wrote:
copy the block from the visible area into the off-screen area,
Neat idea thanks Richard. Just the sort of simple solution I was looking for, it will be fast enough for me. David's graphic capabilities are indeed awesome but it isnt likely I shall go to that level.

Re: Saving an area of the screen

Richard Russell
 

On Wed, Feb 14, 2018 at 09:57 am, Paul Marshall wrote:
David's graphic capabilities are indeed awesome but it isnt likely I shall go to that level.
If you aspire to writing a program with the performance (not necessarily the complexity) of Forces of Darkness you will have to bite the bullet of either using David's library in BB4W or calling SDL functions in BBCSDL.  I would argue that the latter is easier, if only because the functions are better documented than David's are.  In an ideal world I'd like there to be a pair of 2D graphics libraries (one for BB4W and one for BBCSDL) which would encapsulate those functions and provide a common, platform-independent, interface to the user's program - as I have already done for 3D.

Richard.

Re: Testers wanted

DaveinSpain
 

Downloaded the new Dibley app and find that it now works but doesn't know where to go on exit (file or path not found)
Dave N

On Feb 14, 2018 18:56, Richard Russell <news@...> wrote:
On Wed, Feb 14, 2018 at 09:29 am, Chris Fry wrote:
I don’t know if that helps.
Unfortunately knowing that it works doesn't help at all -  it works on all my devices too!  I am waiting to hear whether my recently modified 'dibley.apk' fixes the problem for those who are suffering it, i.e. Robin Hodson and David Nichols.  If it does I will at least have a workaround, but if not I'm as much in the dark as ever.

Richard.

Re: Testers wanted

 

I also get (file or path not found) on my OnePlus 2 running Oxygen=S 3.6.1,

 

But the game works!

 

Chris

 


From: bb4w@groups.io [mailto:bb4w@groups.io] On Behalf Of daveinspain101
Sent: Wednesday, February 14, 2018 7:14 PM
To: bb4w@groups.io
Subject: Re: [bb4w] Testers wanted

 

Downloaded the new Dibley app and find that it now works but doesn't know where to go on exit (file or path not found)
Dave N