Discussion:
RingBound
(too old to reply)
svrsig
2021-12-16 21:57:21 UTC
Permalink
I have just released a new application !RingBind which displays a manual as if it were a ring bound manual, open on the desk.

I have also got a utility to convert a PDF file into a 'Bound' manual which !RingBind will open.

The RISC OS 5.28 User Guide has been converted into 'Bound' format.

This an the application are available from !Store.
Dave
2021-12-17 09:12:55 UTC
Permalink
Post by svrsig
I have just released a new application !RingBind which displays a manual
as if it were a ring bound manual, open on the desk.
I have also got a utility to convert a PDF file into a 'Bound' manual
which !RingBind will open.
The RISC OS 5.28 User Guide has been converted into 'Bound' format.
This an the application are available from !Store.
Neat Idea....

Any idea what this means when I try to run it?
VRPC-DL RISC OS 6.20 221Mbytes of Free memory.


08:59:13.99 ** WimpError ** from unknown task
Error : &000001C1
Message: 90800K of free memory is needed before the application will
start. Quit any unwanted applications or see the RISC OS User Guide for
ways to maximise memory.

Dave
--
Dave Triffid
svrsig
2021-12-17 10:02:24 UTC
Permalink
Post by Dave
Any idea what this means when I try to run it?
VRPC-DL RISC OS 6.20 221Mbytes of Free memory.
08:59:13.99 ** WimpError ** from unknown task
Error : &000001C1
Message: 90800K of free memory is needed before the application will
start. Quit any unwanted applications or see the RISC OS User Guide for
ways to maximise memory.
It means that it needs to load a 141Mbyte Draw file into memory and thus needs a WimpSlot of about 350Mbytes as (i) I have not yet optimised its use of memory and (ii) it would run too slow under emulation anyway.
Dave
2021-12-17 11:43:46 UTC
Permalink
Post by svrsig
Post by Dave
Any idea what this means when I try to run it?
VRPC-DL RISC OS 6.20 221Mbytes of Free memory.
08:59:13.99 ** WimpError ** from unknown task Error : &000001C1
Message: 90800K of free memory is needed before the application will
start. Quit any unwanted applications or see the RISC OS User Guide
for ways to maximise memory.
It means that it needs to load a 141Mbyte Draw file into memory and thus
needs a WimpSlot of about 350Mbytes as (i) I have not yet optimised its
use of memory and (ii) it would run too slow under emulation anyway.
If I just double click the Leaflet file it displays okay and the pages
flip okay.

Dave

Nb: I've seen Martin's reply.
--
Dave Triffid
svrsig
2021-12-17 22:07:57 UTC
Permalink
I suspect the problem is the alias that is set for Bound files ...
Set Alias$@RunType_1EB /<Obey$Dir>.!RunImage %%*0
... so when a Bound file is double-clicked, the !RunImage is run
directly without any WimpSlot settings.

Thanks for spotting this - another version on the way....
svrsig
2021-12-17 23:32:23 UTC
Permalink
Post by Martin
I suspect the problem is the alias that is set for Bound files ...
... so when a Bound file is double-clicked, the !RunImage is run
directly without any WimpSlot settings.
Thanks for spotting this - another version on the way....
Version 0.05 now runs on VRPC. The BASIC programme will now try to
load a double clicked manual if there is already a sufficient wimpslot - if
the wimpslot is too small then the message is ignored so that the application
will be restarted, exactly as if it had not been running.
On entry a sufficient Wimpslot is requested (if a file was double-clicked)
and aborts if this is not available. Hence will now run on VRPC but
the 528 Manual is too large for VRPC.
Dave
2021-12-18 06:08:17 UTC
Permalink
In article <09a56e30-f189-49ef-8b0c-***@googlegroups.com>,
svrsig <***@svrsig.org> wrote:

[Snip]
Version 0.05 now runs on VRPC. The BASIC programme will now try to load
a double clicked manual if there is already a sufficient wimpslot - if
the wimpslot is too small then the message is ignored so that the
application will be restarted, exactly as if it had not been running. On
entry a sufficient Wimpslot is requested (if a file was double-clicked)
and aborts if this is not available.
Hence will now run on VRPC but the 528 Manual is too large for VRPC.
I can confirm version 0.05 will now run on a VRPC-DL RISC OS 6.20

Dave
--
Dave Triffid
svrsig
2021-12-18 08:53:54 UTC
Permalink
Post by Dave
I can confirm version 0.05 will now run on a VRPC-DL RISC OS 6.20
Version 0.06 now gives a tidier error message on VRPC:
'Error during loading 528Manual: Wimpslot of 3Mbytes extended to 29M but 156M required. Aborting'
Dave
2021-12-18 15:34:25 UTC
Permalink
Post by Dave
I can confirm version 0.05 will now run on a VRPC-DL RISC OS 6.20
Version 0.06 now gives a tidier error message on VRPC: 'Error during
loading 528Manual: Wimpslot of 3Mbytes extended to 29M but 156M
required. Aborting'
Yes indeedy it does just that.

Sorry, I need to ask this question as I have a penchant for messing up
folks new apps. :-)

RingBind runs to the icon bar okay, and I can double click "Leaflet" and
it displays.
But this being RISC OS...
I can't drop a RingBind file 'Bound (1eb)' on the icon bar icon and have
it open one of its own files?

Error : &00000000
Message: Unknown or missing variable (Internal error code 2760)
15:28:10.37 ** WimpError ** from RingBind

Sorry Guv' it just broke in me hands. ;-)

Dave
--
Dave Triffid
Dave
2021-12-18 16:00:25 UTC
Permalink
[Snippy]

Phew! Just had a bit of a shock while playing with the app... I ask no
questions but just present the data.

Plain old PDF:
The RISC OS PDF 5.28 manual 11,362,400 bytes

RingBind:
The RISC OS PDF 5.28 manual 147,939,260 bytes

Dave
--
Dave Triffid
Dave
2021-12-18 16:20:29 UTC
Permalink
Post by Dave
Post by Dave
I can confirm version 0.05 will now run on a VRPC-DL RISC OS 6.20
Version 0.06 now gives a tidier error message on VRPC: 'Error during
loading 528Manual: Wimpslot of 3Mbytes extended to 29M but 156M
required. Aborting'
Yes indeedy it does just that.
Sorry, I need to ask this question as I have a penchant for messing up
folks new apps. :-)
RingBind runs to the icon bar okay, and I can double click "Leaflet" and
it displays.
But this being RISC OS...
I can't drop a RingBind file 'Bound (1eb)' on the icon bar icon and have
it open one of its own files?
Error : &00000000
Message: Unknown or missing variable (Internal error code 2760)
15:28:10.37 ** WimpError ** from RingBind
Sorry Guv' it just broke in me hands. ;-)
Dave
Just to round off my testing. :-)

On RPCEmu 0.9.4 and RISC OS 5.28, RingBind 0.06 Runs to the icon bar okay.

The RingBind "Leaflet" file when double clicked displays okay,
additionally it also displays when dropped on the icon bar icon.

The RingBind version of the RISC OS 5.28 manual when double clicked
displays okay, additionally it also displays when dropped on the icon bar
icon.

Excellent, so the above noted problem using the "Leaflet file", has a VRPC
cause.

Dave


Sorry, don't ask me what causes it, I just break things... ;-)
--
Dave Triffid
svrsig
2021-12-20 22:11:04 UTC
Permalink
Post by Chris Hughes
Post by Dave
Sorry, I need to ask this question as I have a penchant for messing up
folks new apps. :-)
RingBind runs to the icon bar okay, and I can double click "Leaflet" and
it displays.
But this being RISC OS...
I can't drop a RingBind file 'Bound (1eb)' on the icon bar icon and have
it open one of its own files?
I think version 0.06 solves that: what happens when a file is double-clicked
is that a Wimp message is passed to running apps and if it is acknowledged
that means an app is loading the file. If not acknowledged the run alias is used
to start up the relevant app (quitting the instantiation of !RingBind if it was running).

If the available WimpSlot is too small to load the 'Bound' file into memory then
the message is not acknowledged and !RingBind is started, expanded if enough
memory is available and if the expansion does not supply enough memory, aborts.
Post by Chris Hughes
How do you create your own 'Bound' book? You mention a utility to convert
a PDF to a 'Bound' file, but I can't see it.
First you extract the content of the !PDF as Draw files, one for each page. Then my
utility creates a 'background' Draw file with a large unused area hidden by a tag into
which each individual Draw file is put, with pointers to beginning and end of each page
and a note of the page size. My hope was that the resulting Draw files would be in
total size about the same as a PDF. However the 528 Manual is 11Mbytes as a PDF
but 148Mbytes as a bunch of Draw files...
Martin
2021-12-17 10:06:47 UTC
Permalink
Post by Dave
Post by svrsig
I have just released a new application !RingBind which displays a
manual as if it were a ring bound manual, open on the desk.
I have also got a utility to convert a PDF file into a 'Bound'
manual which !RingBind will open.
The RISC OS 5.28 User Guide has been converted into 'Bound'
format.
This an the application are available from !Store.
Neat Idea....
Any idea what this means when I try to run it?
VRPC-DL RISC OS 6.20 221Mbytes of Free memory.
08:59:13.99 ** WimpError ** from unknown task
Error : &000001C1
Message: 90800K of free memory is needed before the application
will start. Quit any unwanted applications or see the RISC OS User
Guide for ways to maximise memory.
I had similar problems. I suspect the problem is the alias that is
set for Bound files ...
Set Alias$@RunType_1EB /<Obey$Dir>.!RunImage %%*0
... so when a Bound file is double-clicked, the !RunImage is run
directly without any WimpSlot settings. I think it should run the !Run
file, with some changes to pass through the file name.

So it may work or not, depending on your current settings.
Leaflet will probably work, but 528Guide probably not.

I fear it also tries to load the whole file into application memory
... which as 528Guide is 141MB will fail on any 26-bit system anyway!
--
Martin Avison
Note that unfortunately this email address will become invalid
without notice if (when) any spam is received.
Dave
2021-12-17 11:35:25 UTC
Permalink
Post by Martin
Post by Dave
Post by svrsig
I have just released a new application !RingBind which displays a
manual as if it were a ring bound manual, open on the desk.
I have also got a utility to convert a PDF file into a 'Bound'
manual which !RingBind will open.
The RISC OS 5.28 User Guide has been converted into 'Bound' format.
This an the application are available from !Store.
Neat Idea....
Any idea what this means when I try to run it?
VRPC-DL RISC OS 6.20 221Mbytes of Free memory.
08:59:13.99 ** WimpError ** from unknown task
Error : &000001C1
Message: 90800K of free memory is needed before the application
will start. Quit any unwanted applications or see the RISC OS User
Guide for ways to maximise memory.
I had similar problems. I suspect the problem is the alias that is
set for Bound files ...
... so when a Bound file is double-clicked, the !RunImage is run
directly without any WimpSlot settings. I think it should run the !Run
file, with some changes to pass through the file name.
So it may work or not, depending on your current settings.
Leaflet will probably work, but 528Guide probably not.
I fear it also tries to load the whole file into application memory
... which as 528Guide is 141MB will fail on any 26-bit system anyway!
Thanks for that info Martin.

Yes, If I just double click the Leaflet file it displays, but obviously
not if I try to run RingBind first.

Dave
--
Dave Triffid
Matthew Phillips
2021-12-28 09:36:03 UTC
Permalink
Post by Martin
Post by Dave
Any idea what this means when I try to run it?
VRPC-DL RISC OS 6.20 221Mbytes of Free memory.
08:59:13.99 ** WimpError ** from unknown task
Error : &000001C1
Message: 90800K of free memory is needed before the application
will start. Quit any unwanted applications or see the RISC OS User
Guide for ways to maximise memory.
I had similar problems. I suspect the problem is the alias that is
set for Bound files ...
... so when a Bound file is double-clicked, the !RunImage is run
directly without any WimpSlot settings. I think it should run the !Run
file, with some changes to pass through the file name.
So it may work or not, depending on your current settings.
Leaflet will probably work, but 528Guide probably not.
I fear it also tries to load the whole file into application memory
... which as 528Guide is 141MB will fail on any 26-bit system anyway!
Chris, as your main requirement is for a big block of memory to load the file
into, have you considered grabbing that yourself by manipulating END or using
SYS"Wimp_SlotSize"?

There are various little libraries available to BASIC for efficient
allocation of memory. One which I have used a few times is based on code
from RISC User magazine v. 9, issue 1, p. 17. It provides a shifting heap
manager, which is a little more complicated than you need, but very efficient
for memory use. You can see how I have used it in the !RunImage of
DrawToSprite which is a free download from the Sine Nomine Software website.

Another thing to consider, before you go too far, is the design of the file
format. Without documentation I have had to guess, so apologies if this is
wrong. It looked to me like there were perhaps just a series of Draw files
stuck end to end in the file. But if so, I am not sure where the navigation
tabs come from.

Anyhow, if you want to improve the application so that it only loads the
necessary pages into memory, you will find it helpful to have some sort of
index or directory giving the offsets from the start of the file to the start
of each page. You might then hit the challenge of where to store that
directory. If you store it at the start of the file, then you need to know
how many pages there are before you start writing the file, in order to leave
enough room for the right number of page offsets. If that is going to be a
problem, you could always reserve the first word of the file, write the pages
one after another, and then write the index at the end of the file, finally
changing PTR# to point to the starting word again and writing an offset to
the location of the directory. I would always recommend including a file
format version number at the start of your file, so that you can more easily
change the format later. Your application should check the format version
number and refuse to render (advising the user to upgrade the application) if
the version number is too high.

A few style guide and feature thoughts...

At the moment Select and Adjust determine whether to use animate page turning
or not. I think Adjust ought to turn the page backwards -- that's the
natural action you would expect. See Organizer for an example of this.
Perhaps animation could become a Choice, or use a modifier like Ctrl or
Shift, unless you're planning for Shift to move multiple pages and Ctrl to
move to the next section!

It would be better for most of the things on the iconbar menu to appear
instead in a menu over the main window. The iconbar menu should not have
much more than global choices, help, quit, info, etc.

Would be good if the main window could have the input focus so that Page
Up/Down would work for page turning.

Animation was extremely slow on our Iyonix, and then there was a big redraw
of the whole window after the page had turned which seemed unnecessary. I
expect this is all better on a modern machine. Perhaps the application could
detect the time taken to render and adjust the number of animation steps to
keep it acceptable?

From scrolling through the example Leaflet file in a text editor, it looked
like the Draw files had text rendered as paths. This will ensure it looks
good, but it does mean you wouldn't be able to support a search facility. I
guess this limitation may come from your source materials. If you are
converting from PDF to Draw then you may find that the method you use to
produce the PDF file makes a difference. Are you using the Tytgat/Wuerthner
PostScript 3 drivers, for example?

Or perhaps rendering as paths is needed to support the animation? If so,
then sacrificing the ability to search the text is too high a price to pay,
in my opinion.

It would be good if the application icon and the icon for the filetype could
look more different from each other. Applications should have some
transparency if they are not square, whereas file icons on RISC OS 5 should
have a graduated grey background to fill out the square and a curling bottom
right corner.

Sorry to bombard you with suggestions: they're just a few thoughts that
occurred when exploring your application. It's always hard to know at what
stage to feed these suggestions in! I don't want to discourage anyone from
releasing applications before they are fully polished. The worst software of
all is the software that hasn't been released yet because there are two or
three minor things still to tidy up. I know I've got a few examples like
that lurking on my hard disc, so congratulations on getting the software out
there for people to try.

All the best,
--
Matthew Phillips
Durham
svrsig
2021-12-30 10:14:31 UTC
Permalink
Post by Matthew Phillips
Chris, as your main requirement is for a big block of memory to load the file
into, have you considered grabbing that yourself by manipulating END or using
SYS"Wimp_SlotSize"?
It does do this. If the double-click message is received via a Wimp message, it
looks to see if it already has enough memory - if not it ignores the message and
waits for AliasRun to run it when it tries again.
When run via AliasRun it tries to allocate enough memory to load the whole file
and (in a later version) will then try to load just four pages of content at a time.
Post by Matthew Phillips
There are various little libraries available to BASIC for efficient
allocation of memory. One which I have used a few times is based on code
from RISC User magazine v. 9, issue 1, p. 17. It provides a shifting heap
manager, which is a little more complicated than you need, but very efficient
for memory use. You can see how I have used it in the !RunImage of
DrawToSprite which is a free download from the Sine Nomine Software website.
I only need four pages in memory at a time and can load these on demand via
OS_GBPB.
Post by Matthew Phillips
Another thing to consider, before you go too far, is the design of the file
format. Without documentation I have had to guess, so apologies if this is
wrong. It looked to me like there were perhaps just a series of Draw files
stuck end to end in the file. But if so, I am not sure where the navigation
tabs come from.
PM sent.
Post by Matthew Phillips
A few style guide and feature thoughts...
At the moment Select and Adjust determine whether to use animate page turning
or not. I think Adjust ought to turn the page backwards -- that's the
natural action you would expect. See Organizer for an example of this.
Perhaps animation could become a Choice, or use a modifier like Ctrl or
Shift, unless you're planning for Shift to move multiple pages and Ctrl to
move to the next section!
It would be better for most of the things on the iconbar menu to appear
instead in a menu over the main window. The iconbar menu should not have
much more than global choices, help, quit, info, etc.
This is a fault I often commit.
Post by Matthew Phillips
Would be good if the main window could have the input focus so that Page
Up/Down would work for page turning.
I'll think about this ....
Post by Matthew Phillips
Animation was extremely slow on our Iyonix, and then there was a big redraw
of the whole window after the page had turned which seemed unnecessary. I
expect this is all better on a modern machine. Perhaps the application could
detect the time taken to render and adjust the number of animation steps to
keep it acceptable?
Yes. I think Adjust (to do the animation) will only be a 'show-off' feature.
It runs well on a Pi4B.
Post by Matthew Phillips
From scrolling through the example Leaflet file in a text editor, it looked
like the Draw files had text rendered as paths. This will ensure it looks
good, but it does mean you wouldn't be able to support a search facility. I
guess this limitation may come from your source materials. If you are
converting from PDF to Draw then you may find that the method you use to
produce the PDF file makes a difference. Are you using the Tytgat/Wuerthner
PostScript 3 drivers, for example?
Yes.

Annoyingly when I extract the individual page Draw files using !PDF and a batch
save as Draw files, I find that each character is a separate text object.
Post by Matthew Phillips
Or perhaps rendering as paths is needed to support the animation? If so,
then sacrificing the ability to search the text is too high a price to pay,
in my opinion.
Searching the text is currently awkward (the text is held as single characters).
Post by Matthew Phillips
It would be good if the application icon and the icon for the filetype could
look more different from each other. Applications should have some
transparency if they are not square, whereas file icons on RISC OS 5 should
have a graduated grey background to fill out the square and a curling bottom
right corner.
Sorry to bombard you with suggestions: they're just a few thoughts that
occurred when exploring your application. It's always hard to know at what
stage to feed these suggestions in! I don't want to discourage anyone from
releasing applications before they are fully polished. The worst software of
all is the software that hasn't been released yet because there are two or
three minor things still to tidy up. I know I've got a few examples like
that lurking on my hard disc, so congratulations on getting the software out
there for people to try.
All the best,
Many thanks vor the comments.
svrsig
2021-12-31 18:07:11 UTC
Permalink
Post by svrsig
Post by Matthew Phillips
Chris, as your main requirement is for a big block of memory to load the file
into, have you considered grabbing that yourself by manipulating END or using
SYS"Wimp_SlotSize"?
Many thanks vor the comments.
Version 0.10 now runs in a 12Mbyte Wimpslot even when displaying a
140MByte RISC OS 5,28 User Manual. It now therefore runs on VRPC.

Chapter, Section and sub-section moves are now supported. Error
handling is improved.
svrsig
2022-01-05 09:55:56 UTC
Permalink
Post by svrsig
Version 0.10 now runs in a 12Mbyte Wimpslot even when displaying a
140MByte RISC OS 5,28 User Manual. It now therefore runs on VRPC.
Chapter, Section and sub-section moves are now supported. Error
handling is improved.
Version 0.15 now detects errors from SpriteExtend if skewed JPEGs are rendered.

Resources to create your own 'Bound' files from a PDF are now included.
svrsig
2022-01-12 06:14:16 UTC
Permalink
Post by svrsig
Version 0.15 now detects errors from SpriteExtend if skewed JPEGs are rendered.
Resources to create your own 'Bound' files from a PDF are now included.
Version 0.16 now handles any window being dragged across the desktop while the animated page turning is being displayed - previously the dragged window would remain in its original position on one screen bank.
Chris Hughes
2021-12-18 13:39:40 UTC
Permalink
Post by svrsig
I have just released a new application !RingBind which displays a manual
as if it were a ring bound manual, open on the desk.
I have also got a utility to convert a PDF file into a 'Bound' manual
which !RingBind will open.
The RISC OS 5.28 User Guide has been converted into 'Bound' format.
This an the application are available from !Store.
How do you create your own 'Bound' book? You mention a utility to convert
a PDF to a 'Bound' file, but I can't see it.
--
Chris Hughes
Loading...