Date   
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.

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.

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? 

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.


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: 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 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: Testers wanted

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

Re: Testers wanted

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

Re: Testers wanted

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.

Re: Testers wanted

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

Re: Wikispaces is closing down

Richard Russell
 

On Tue, Feb 13, 2018 at 07:07 am, J.G.Harston wrote:
If this is acceptable I can do a bulk export
I am sure you understand, but in no circumstances would I consider it acceptable for the wiki to be hosted on a private server such as yours, sorry. I would also like to remind everybody that contributors to the wiki retain Intellectual Property Rights to the material they submit; the content is not 'copyright free'.   Strictly speaking that probably prevents me moving the wiki to another host without getting the permission of every contributor, but I hope that in practice common sense would apply and that nobody would raise any objections.

Richard.

Re: Wikispaces is closing down

J.G.Harston
 

I've been planning on moving my Whitby Wiki[1] onto my own server to have more control over the layout and get rid of the adverts. To remind myself of the process I've done a test setup of a BBC BASIC Wiki: http://bbwiki.mdfs.net

The markup syntax is different, but I wrote some code some time ago that does the bulk of translation, leaving about 10% needing manual assistance. If this is acceptable I can do a bulk export and transfer everything from WikiSpaces and do the manual massaging.

As long as every five years I remember to renew the domain subscriptions and I keep paying my electricity bills there's nothing else that needs doing.

[1] http://whitby.wikia.com/wiki/Whitby_Wiki

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

Re: Bedstead font

Richard Russell
 

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.

Re: The Learning Process

Richard Russell
 

On Tue, Feb 13, 2018 at 01:25 am, <maurice22@...> wrote:
but is quite tedious for the more involved lines.
There are various alternatives, although whether you consider any of them to be less "tedious" is another matter.  Here's one which uses BBC BASIC's array capabilities to advantage:

      DIM colour$(7)
      colour$() = " 0 BLACK"," 1 RED"," 2 GREEN"," 3 YELLOW"," 4 BLUE"," 5 MAGENTA"," 6 CYAN"," 7 WHITE"
      colour$() += CHR$(13) + CHR$(10)
      PRINT SUM(colour$())

Obviously you could initialise the array from DATA statements or a file rather than with explicit strings as above.  You could also use a single string variable rather than an array if you prefer.  There's no right or wrong way, it's just a case of what appeals to your own sense of neatness.

Richard.

Re: Testers wanted

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.

The Learning Process

maurice
 

To assist me in my elementary study of BBC4 I am writing a self help programme which enables me to select all that I understand about a particular keyword or process. Whenever I wish to print  Vertical Text such as the colour table I use the following code.
IF N =4 THEN PRINT " 1   RED " ' " 2   GREEN" ' " 3   YELLOW" ' " 4   BLUE" ' " 5   MAGENTA" ' " 6   CYAN" ' " 7   WHITE"
which works , but is quite tedious for the more involved lines.
I cannot find a way to print several lines of Text with one PRINT. 

Re: Wikispaces is closing down

Richard Russell
 

On Mon, Feb 12, 2018 at 11:53 pm, Storer, Darren wrote:
Please could I have a static HTML export of the BB4W wiki?
I don't think it makes sense to do anything yet.  The wiki doesn't close down until September and before then new articles may be added or existing articles edited.  Nor do I want people to keep 'private' copies that cannot be edited or added to; the whole point of a wiki is that it is a shared, user-editable resource (this has been discussed here before, I think).

So rather than panic, which there is no reason to yet, can we please put our efforts into trying to find a new home for the wiki.

Richard.

Re: Testers wanted

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.

Re: Testers wanted

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!