Matrix Brandy BASIC V for Linux with SDL: V1.21.21 released

discuss PC<>Acorn file transfer issues & the use of FDC, XFER, Omniflop/disk etc.
Soruk
Posts: 352
Joined: Mon Jul 09, 2018 10:31 am
Location: Basingstoke, Hampshire
Contact:

Re: Matrix Brandy BASIC V for Linux with SDL: V1.21.18 released

Post by Soruk » Wed Feb 27, 2019 4:09 pm

Soruk wrote:
Tue Feb 26, 2019 8:28 pm
Richard Russell wrote:
Tue Feb 26, 2019 1:34 pm
Is *EXEC supposed to work in Matrix Brandy v1.21.18 (Windows build)? When I try it I get "'exec' is not recognized as an internal or external command, operable program or batch file".
No, it has not (yet) been implemented. However, if you have a BASIC program as a text file, you can just LOAD/CHAIN it.
I've added it, it's in git if you want to build it yourself, or it'll be in tonight's nightly build.

User avatar
Richard Russell
Posts: 804
Joined: Sun Feb 27, 2011 10:35 am
Location: Downham Market, Norfolk
Contact:

Re: Matrix Brandy BASIC V for Linux with SDL: V1.21.18 released

Post by Richard Russell » Wed Feb 27, 2019 6:00 pm

Soruk wrote:
Wed Feb 27, 2019 4:09 pm
I've added it
Thanks.

If I do *DIR I get a directory listing followed by a large number of lines containing only a prompt (possibly infinite, I've not waited long enough to see if they stop eventually) as if I'm constantly pressing 'Enter'; typing any character seems to terminate this. One undesirable consequence is that the directory listing is scrolled off the top unless you press a key very quickly! This is with the Windows build of 1.21.18.

Soruk
Posts: 352
Joined: Mon Jul 09, 2018 10:31 am
Location: Basingstoke, Hampshire
Contact:

Re: Matrix Brandy BASIC V for Linux with SDL: V1.21.18 released

Post by Soruk » Thu Feb 28, 2019 9:21 am

Richard Russell wrote:
Wed Feb 27, 2019 6:00 pm
Soruk wrote:
Wed Feb 27, 2019 4:09 pm
I've added it
Thanks.

If I do *DIR I get a directory listing followed by a large number of lines containing only a prompt (possibly infinite, I've not waited long enough to see if they stop eventually) as if I'm constantly pressing 'Enter'; typing any character seems to terminate this. One undesirable consequence is that the directory listing is scrolled off the top unless you press a key very quickly! This is with the Windows build of 1.21.18.
Unfortunately, I am unable to replicate this issue, either with the V1.21.18 release or the latest nightly. Testing on Windows 10 64-bit (my work laptop!) and a Windows 7 32-bit VM. However, I suspect it could be related to the popen() call briefly opening a console window, and that window for its brief existence takes the focus so "steals" the key-up event away from Brandy.

If doing

Code: Select all

WAIT 10:*dir
works for you then that would rather confirm that idea. Unfortunately it seems MinGW doesn't seem to have a way to popen() a sub-process without a console window appearing.

Edit: I MIGHT be able to work around this, by pushing an SDL_KEYUP event or similar to the SDL event queue after a popen() call, but that really depends if my hunch above is correct.
Last edited by Soruk on Thu Feb 28, 2019 10:01 am, edited 1 time in total.

User avatar
Richard Russell
Posts: 804
Joined: Sun Feb 27, 2011 10:35 am
Location: Downham Market, Norfolk
Contact:

Re: Matrix Brandy BASIC V for Linux with SDL: V1.21.18 released

Post by Richard Russell » Thu Feb 28, 2019 10:05 am

Soruk wrote:
Thu Feb 28, 2019 9:21 am
If doing

Code: Select all

WAIT 10:*dir
works
Yes, that does indeed fix the problem.

Soruk
Posts: 352
Joined: Mon Jul 09, 2018 10:31 am
Location: Basingstoke, Hampshire
Contact:

Re: Matrix Brandy BASIC V for Linux with SDL: V1.21.18 released

Post by Soruk » Thu Feb 28, 2019 11:04 am

Richard Russell wrote:
Thu Feb 28, 2019 10:05 am
Soruk wrote:
Thu Feb 28, 2019 9:21 am
If doing

Code: Select all

WAIT 10:*dir
works
Yes, that does indeed fix the problem.
OK, that's good to know, and I can replicate it somewhat, when running Brandy from Cygwin, doing *sleep 1 - a cmd window is opened for a second, so if I let go of Enter while that window is open, the recurring ENTER effect is seen. This is good, that I can replicate it else it would be a nightmare to fix!

Interestingly, under Linux, doing *xterm -e sleep 1 does NOT seem to replicate this problem, even though the xterm window is stealing the focus.

User avatar
Richard Russell
Posts: 804
Joined: Sun Feb 27, 2011 10:35 am
Location: Downham Market, Norfolk
Contact:

Re: Matrix Brandy BASIC V for Linux with SDL: V1.21.18 released

Post by Richard Russell » Thu Feb 28, 2019 12:06 pm

Soruk wrote:
Thu Feb 28, 2019 11:04 am
I can replicate it somewhat, when running Brandy from Cygwin, doing *sleep 1 - a cmd window is opened for a second, so if I let go of Enter while that window is open, the recurring ENTER effect is seen.
Interesting. I've always assumed that SDL 2 is simply responding to the auto-repeat events generated by the OS, which ought to mean it is immune to this kind of problem. I can't find an explicit confirmation of this, but certainly SDL_EnableKeyRepeat is an SDL 1.2 function with no equivalent in SDL 2.0.

Soruk
Posts: 352
Joined: Mon Jul 09, 2018 10:31 am
Location: Basingstoke, Hampshire
Contact:

Re: Matrix Brandy BASIC V for Linux with SDL: V1.21.18 released

Post by Soruk » Thu Feb 28, 2019 1:03 pm

Soruk wrote:
Thu Feb 28, 2019 9:21 am
Edit: I MIGHT be able to work around this, by pushing an SDL_KEYUP event or similar to the SDL event queue after a popen() call, but that really depends if my hunch above is correct.
This won't work - according to SDL 1.2 docs (and an attempt to do it), pushing device events to the queue don't change the device state - so a stuck key event can only be cleared by actually hitting the key. Annoying but I don't see a way round it :(

Soruk
Posts: 352
Joined: Mon Jul 09, 2018 10:31 am
Location: Basingstoke, Hampshire
Contact:

Re: Matrix Brandy BASIC V for Linux with SDL: V1.21.18 released

Post by Soruk » Thu Feb 28, 2019 1:13 pm

Richard Russell wrote:
Thu Feb 28, 2019 12:06 pm
Soruk wrote:
Thu Feb 28, 2019 11:04 am
I can replicate it somewhat, when running Brandy from Cygwin, doing *sleep 1 - a cmd window is opened for a second, so if I let go of Enter while that window is open, the recurring ENTER effect is seen.
Interesting. I've always assumed that SDL 2 is simply responding to the auto-repeat events generated by the OS, which ought to mean it is immune to this kind of problem. I can't find an explicit confirmation of this, but certainly SDL_EnableKeyRepeat is an SDL 1.2 function with no equivalent in SDL 2.0.
That gave me an idea. Switch off auto repeat and turn it back on again. It works in that it stops this behaviour - but a side-effect is that after running the command, the first press of ENTER is then swallowed. Investigating with INKEY(-74) tells me SDL still thinks the key is being held down so hitting the Enter key seems the only way to clear that, it can't be done programmatically. Argh. :(

Edit: I've pushed this to git, but I'm not sure which is the lesser of the two evils....
Last edited by Soruk on Thu Feb 28, 2019 3:25 pm, edited 1 time in total.

User avatar
Richard Russell
Posts: 804
Joined: Sun Feb 27, 2011 10:35 am
Location: Downham Market, Norfolk
Contact:

Re: Matrix Brandy BASIC V for Linux with SDL: V1.21.18 released

Post by Richard Russell » Thu Feb 28, 2019 6:06 pm

Soruk wrote:
Thu Feb 28, 2019 1:13 pm
I've pushed this to git, but I'm not sure which is the lesser of the two evils....
From my perspective neither is very satisfactory. How acceptable would it be to wait until Enter is released before executing the *DIR command? Given that mouse clicks often take effect on the button release rather than on the press, similar behaviour from the keyboard might not be too noticeable, in this special case at least.

User avatar
dhg2
Posts: 122
Joined: Tue Oct 25, 2016 7:37 pm
Contact:

Re: Matrix Brandy BASIC V for Linux with SDL: V1.21.18 released

Post by dhg2 » Thu Feb 28, 2019 7:35 pm

It's not closely related to the current discussion, but I'm wondering, is there any chance that matrix brandy would be ported to SDL2 at some point in the future?
I'm thinking that problems like this would be less likely to happen with SDL2. Using SDL2 might also make it easier to implement features that are currently only found in Richard Russell's BBCSDL/BB4W.
Regards,
- Patrick

Soruk
Posts: 352
Joined: Mon Jul 09, 2018 10:31 am
Location: Basingstoke, Hampshire
Contact:

Re: Matrix Brandy BASIC V for Linux with SDL: V1.21.18 released

Post by Soruk » Fri Mar 01, 2019 12:48 am

Richard Russell wrote:
Thu Feb 28, 2019 6:06 pm
How acceptable would it be to wait until Enter is released before executing the *DIR command? Given that mouse clicks often take effect on the button release rather than on the press, similar behaviour from the keyboard might not be too noticeable, in this special case at least.
OK - I have implemented this and tested on my Win7 VM, and pushed it to git. It'll be in tonight's nightly build.

Right now this is on any SDL build, but I might limit it to Windows builds as the bug does not manifest itself on Linux (at least on my setup), even if I try to force it with *xterm -e sleep 1
Last edited by Soruk on Fri Mar 01, 2019 12:51 am, edited 1 time in total.

User avatar
Richard Russell
Posts: 804
Joined: Sun Feb 27, 2011 10:35 am
Location: Downham Market, Norfolk
Contact:

Re: Matrix Brandy BASIC V for Linux with SDL: V1.21.18 released

Post by Richard Russell » Fri Mar 01, 2019 10:15 am

Soruk wrote:
Fri Mar 01, 2019 12:48 am
the bug does not manifest itself on Linux
That might suggest the underlying cause is a fault in Cygwin's implementation of popen(). If you want a 'proper' fix the way to go is probably to replace it, when running in Windows, with a call to CreateProcess. That should also have the advantage of not displaying an empty command window if you utilise the wShowWindow member of the STARTUPINFO structure.

Soruk
Posts: 352
Joined: Mon Jul 09, 2018 10:31 am
Location: Basingstoke, Hampshire
Contact:

Re: Matrix Brandy BASIC V for Linux with SDL: V1.21.18 released

Post by Soruk » Fri Mar 01, 2019 11:33 am

Richard Russell wrote:
Fri Mar 01, 2019 10:15 am
Soruk wrote:
Fri Mar 01, 2019 12:48 am
the bug does not manifest itself on Linux
That might suggest the underlying cause is a fault in Cygwin's implementation of popen(). If you want a 'proper' fix the way to go is probably to replace it, when running in Windows, with a call to CreateProcess. That should also have the advantage of not displaying an empty command window if you utilise the wShowWindow member of the STARTUPINFO structure.
I will look into that - but the bit I mean about not having the problem on Linux is even having an xterm pop up and steal the focus, the stuck key effect isn't happening. Also, it's MinGW, while I'm using Cygwin for the toolchain, no Cygwin libraries are being used in Brandy.

Looks like I'll have to start looking at Windows API programming. This is totally new to me, and hopefully I can do it with my existing toolchain...
Last edited by Soruk on Fri Mar 01, 2019 11:34 am, edited 1 time in total.

Soruk
Posts: 352
Joined: Mon Jul 09, 2018 10:31 am
Location: Basingstoke, Hampshire
Contact:

Re: Matrix Brandy BASIC V for Linux with SDL: V1.21.18 released

Post by Soruk » Fri Mar 01, 2019 11:48 am

dhg2 wrote:
Thu Feb 28, 2019 7:35 pm
It's not closely related to the current discussion, but I'm wondering, is there any chance that matrix brandy would be ported to SDL2 at some point in the future?
I'm thinking that problems like this would be less likely to happen with SDL2. Using SDL2 might also make it easier to implement features that are currently only found in Richard Russell's BBCSDL/BB4W.
It's one thing I'd like to do - that'll probably a V1.22.x thing.

User avatar
Richard Russell
Posts: 804
Joined: Sun Feb 27, 2011 10:35 am
Location: Downham Market, Norfolk
Contact:

Re: Matrix Brandy BASIC V for Linux with SDL: V1.21.18 released

Post by Richard Russell » Fri Mar 01, 2019 12:24 pm

Soruk wrote:
Fri Mar 01, 2019 11:33 am
no Cygwin libraries are being used in Brandy.
OK. So is the popen() you are calling Microsoft's implementation in the CRT (with a leading underscore)? I wouldn't expect that to be buggy, but it explicitly states that it can be used only in a console application,which presumably Brandy isn't.

Soruk
Posts: 352
Joined: Mon Jul 09, 2018 10:31 am
Location: Basingstoke, Hampshire
Contact:

Re: Matrix Brandy BASIC V for Linux with SDL: V1.21.18 released

Post by Soruk » Fri Mar 01, 2019 2:43 pm

Richard Russell wrote:
Fri Mar 01, 2019 12:24 pm
Soruk wrote:
Fri Mar 01, 2019 11:33 am
no Cygwin libraries are being used in Brandy.
OK. So is the popen() you are calling Microsoft's implementation in the CRT (with a leading underscore)? I wouldn't expect that to be buggy, but it explicitly states that it can be used only in a console application,which presumably Brandy isn't.
I think the translation from popen() to _popen() is done by MinGW. I did see that, and the warning
Microsoft wrote: If used in a Windows program, the _popen function returns an invalid file pointer that causes the program to stop responding indefinitely.
yet, despite the cmd window glitch, it is working.

User avatar
Richard Russell
Posts: 804
Joined: Sun Feb 27, 2011 10:35 am
Location: Downham Market, Norfolk
Contact:

Re: Matrix Brandy BASIC V for Linux with SDL: V1.21.18 released

Post by Richard Russell » Fri Mar 01, 2019 3:55 pm

Soruk wrote:
Fri Mar 01, 2019 2:43 pm
despite the cmd window glitch, it is working.
I might argue that the "glitch" means it's not working. :)

Calling CreateProcess would undoubtedly be more work than popen, but it's what Microsoft says you should do, and they provide ready-made code to copy-and-paste. As far as compatibility with your toolchain is concerned, since you're already effectively using MinGW rather than Cygwin I wouldn't expect any complications.

Soruk
Posts: 352
Joined: Mon Jul 09, 2018 10:31 am
Location: Basingstoke, Hampshire
Contact:

Re: Matrix Brandy BASIC V for Linux with SDL: V1.21.18 released

Post by Soruk » Fri Mar 01, 2019 7:45 pm

Richard Russell wrote:
Fri Mar 01, 2019 3:55 pm
Soruk wrote:
Fri Mar 01, 2019 2:43 pm
despite the cmd window glitch, it is working.
I might argue that the "glitch" means it's not working. :)

Calling CreateProcess would undoubtedly be more work than popen, but it's what Microsoft says you should do, and they provide ready-made code to copy-and-paste. As far as compatibility with your toolchain is concerned, since you're already effectively using MinGW rather than Cygwin I wouldn't expect any complications.
Somehow, I have managed to make this work. The link you gave above was extremely useful, I basically took that and adapted it for this, though I did run into a few hiccups along the way.

It'll be in tonight's nightly build.

User avatar
Richard Russell
Posts: 804
Joined: Sun Feb 27, 2011 10:35 am
Location: Downham Market, Norfolk
Contact:

Re: Matrix Brandy BASIC V for Linux with SDL: V1.21.18 released

Post by Richard Russell » Fri Mar 01, 2019 7:50 pm

Soruk wrote:
Fri Mar 01, 2019 7:45 pm
Somehow, I have managed to make this work.
=D> =D>

Soruk
Posts: 352
Joined: Mon Jul 09, 2018 10:31 am
Location: Basingstoke, Hampshire
Contact:

Matrix Brandy BASIC V for Linux with SDL: V1.21.19 released

Post by Soruk » Fri Mar 01, 2019 10:56 pm

Hi,

I've put together the release for Matrix Brandy V1.21.19. This release wraps up a number of fixes, including various shortcomings that were present under Windows.
Changes include:
- Hopefully fixed the spurious cursor remnants.
- Ellipses with shears now implemented, PLOT &C5 and PLOT &CD now work somewhat correctly. Other variants to be tested.
- ELLIPSE [FILL] command with non-zero angle now supported.
- MODE 7: Update screen on WAIT-delay, and flash continues during WAIT.
- MODE 7: Increase display accuracy at the expense of performance, switchable via VDU23,18,1,x| - bit 0 is also now implemented.
- MODE 7: *REFRESH now does the right thing.
- WAIT can now be interrupted with ESCAPE.
- Invocation behaviour change: brandy <filename> now assumes -quit instead of -chain.
- Support for shrouded BASIC programs, examples/shroud will shroud a program hiding the source code. It is itself shrouded. A shrouded program cannot be LOADed or CHAINed, and can only be invoked from the command line.
- Further keyboard updates from JGHarston.
- Makefile and code improvement contributions from ccawley2011 @ github.
- Corrected behaviour of EOF#0, BPUT#0, BGET#0 etc, thanks dhg2 @ Stardot.
- *EXEC implemented. Idea from Richard Russell.
- *-commands that call out to external commands from Windows no longer cause a CMD window to open, also fixing the "stuck key" problem associated with this. Thanks again to Richard Russell for the guidance here.
Last edited by Soruk on Fri Mar 01, 2019 10:57 pm, edited 1 time in total.

User avatar
Richard Russell
Posts: 804
Joined: Sun Feb 27, 2011 10:35 am
Location: Downham Market, Norfolk
Contact:

Re: Matrix Brandy BASIC V for Linux with SDL: V1.21.19 released

Post by Richard Russell » Sat Mar 02, 2019 12:04 pm

Soruk wrote:
Fri Mar 01, 2019 10:56 pm
MODE 7: Increase display accuracy at the expense of performance
Possibly you've covered this before, if so apologies for having missed it, but can you expand on this a bit (or link to an earlier discussion)?

Soruk
Posts: 352
Joined: Mon Jul 09, 2018 10:31 am
Location: Basingstoke, Hampshire
Contact:

Re: Matrix Brandy BASIC V for Linux with SDL: V1.21.19 released

Post by Soruk » Sat Mar 02, 2019 2:31 pm

Richard Russell wrote:
Sat Mar 02, 2019 12:04 pm
Soruk wrote:
Fri Mar 01, 2019 10:56 pm
MODE 7: Increase display accuracy at the expense of performance
Possibly you've covered this before, if so apologies for having missed it, but can you expand on this a bit (or link to an earlier discussion)?
Not mentioned here, so no worries! For Mode 7 rendering accuracy, the VDU driver writes to a frame buffer, which is periodically rendered. It never mis-renders, but the VDU 23,18,1,X| setting (detailed in docs/mode7.txt) just determines exactly when the rendering is done, the default is the lowest performance but best appearance, done after every character is written to the buffer.

Hope that helps :)

User avatar
Richard Russell
Posts: 804
Joined: Sun Feb 27, 2011 10:35 am
Location: Downham Market, Norfolk
Contact:

Re: Matrix Brandy BASIC V for Linux with SDL: V1.21.19 released

Post by Richard Russell » Sat Mar 02, 2019 3:12 pm

Soruk wrote:
Sat Mar 02, 2019 2:31 pm
VDU 23,18,1,X| setting (detailed in docs/mode7.txt) just determines exactly when the rendering is done, the default is the lowest performance but best appearance, done after every character is written to the buffer. Hope that helps :)
I'm not sure that I entirely follow. There's no similar provision in BBC BASIC for Windows or BBC BASIC for SDL 2.0 so what should I be looking for in respect of any performance and/or appearance issues that might be arising? Do you have a test program which demonstrates how your VDU 23,18,1 affects behaviour?

Incidentally there is no 'docs' folder in brandy-1.21.19.zip, just the single file 'brandy.exe'.

Soruk
Posts: 352
Joined: Mon Jul 09, 2018 10:31 am
Location: Basingstoke, Hampshire
Contact:

Re: Matrix Brandy BASIC V for Linux with SDL: V1.21.19 released

Post by Soruk » Sat Mar 02, 2019 3:37 pm

Richard Russell wrote:
Sat Mar 02, 2019 3:12 pm
Soruk wrote:
Sat Mar 02, 2019 2:31 pm
VDU 23,18,1,X| setting (detailed in docs/mode7.txt) just determines exactly when the rendering is done, the default is the lowest performance but best appearance, done after every character is written to the buffer. Hope that helps :)
I'm not sure that I entirely follow. There's no similar provision in BBC BASIC for Windows or BBC BASIC for SDL 2.0 so what should I be looking for in respect of any performance and/or appearance issues that might be arising? Do you have a test program which demonstrates how your VDU 23,18,1 affects behaviour?
I don't have any specific example programs, however, the default X is 2, what I previously had as default is now with X=0, and fastest execution time but with infrequent updates X=1.
Richard Russell wrote:
Sat Mar 02, 2019 3:12 pm
Incidentally there is no 'docs' folder in brandy-1.21.19.zip, just the single file 'brandy.exe'.
Ah, sorry. This is in the source release, perhaps for release builds I should include the docs and examples!

...indeed, I've just re-uploaded the 1.21.19 release with these.

User avatar
Richard Russell
Posts: 804
Joined: Sun Feb 27, 2011 10:35 am
Location: Downham Market, Norfolk
Contact:

Re: Matrix Brandy BASIC V for Linux with SDL: V1.21.19 released

Post by Richard Russell » Tue Mar 05, 2019 9:44 am

Seems to be a graphics issue here (v1.21.19):

Code: Select all

      MODE 0
      GCOL 3,15
      CIRCLE FILL 500,500,10
The resulting drawn object (magnified) looks nothing like a filled circle:

brandycircle.png
brandycircle.png (838 Bytes) Viewed 1045 times

Soruk
Posts: 352
Joined: Mon Jul 09, 2018 10:31 am
Location: Basingstoke, Hampshire
Contact:

Re: Matrix Brandy BASIC V for Linux with SDL: V1.21.19 released

Post by Soruk » Wed Mar 06, 2019 4:02 am

Richard Russell wrote:
Tue Mar 05, 2019 9:44 am
Seems to be a graphics issue here (v1.21.19):

Code: Select all

      MODE 0
      GCOL 3,15
      CIRCLE FILL 500,500,10
The resulting drawn object (magnified) looks nothing like a filled circle:

brandycircle.png
The FILL algorithm could be improved. Pretty much all graphics are directed via a couple of primitives (e.g. plotting a point) that is GCOL action aware, if a point is hit more than once by the FILL algorithm then some strange effects can occur with non-zero action codes.

User avatar
Richard Russell
Posts: 804
Joined: Sun Feb 27, 2011 10:35 am
Location: Downham Market, Norfolk
Contact:

Re: Matrix Brandy BASIC V for Linux with SDL: V1.21.19 released

Post by Richard Russell » Wed Mar 06, 2019 9:38 am

Soruk wrote:
Wed Mar 06, 2019 4:02 am
if a point is hit more than once by the FILL algorithm then some strange effects can occur with non-zero action codes.
I guessed that was the reason. Because of the XOR mode, which of course is commonly used for animation, you must ensure that all the drawing primitives visit each pixel only once. Apart from PLOT 8-15 that is, which deliberately plot the last point twice (documented as 'omitting' the last point, but that's only true in an XOR mode).

I was trying to port this to Matrix Brandy so that I could include it in the list of supported BASICs in my Twitter post, but the bug stopped me. You missed out on some good publicity because my video of that animation, despite not even being original, has been viewed more than 11,000 times!

Soruk
Posts: 352
Joined: Mon Jul 09, 2018 10:31 am
Location: Basingstoke, Hampshire
Contact:

Re: Matrix Brandy BASIC V for Linux with SDL: V1.21.19 released

Post by Soruk » Wed Mar 06, 2019 1:21 pm

Richard Russell wrote:
Wed Mar 06, 2019 9:38 am
Soruk wrote:
Wed Mar 06, 2019 4:02 am
if a point is hit more than once by the FILL algorithm then some strange effects can occur with non-zero action codes.
I guessed that was the reason. Because of the XOR mode, which of course is commonly used for animation, you must ensure that all the drawing primitives visit each pixel only once. Apart from PLOT 8-15 that is, which deliberately plot the last point twice (documented as 'omitting' the last point, but that's only true in an XOR mode).

I was trying to port this to Matrix Brandy so that I could include it in the list of supported BASICs in my Twitter post, but the bug stopped me. You missed out on some good publicity because my video of that animation, despite not even being original, has been viewed more than 11,000 times!
OK - I've rewritten the fill routine, it's simpler, faster, and gets this right. Your demo looks best run in MODE 20. Also, penultimate line, add a check for INKEY(-256)>=243.
It'll be in tonight's nightly, but if you want to have a play today, I've put a build up here.

(The old fill code was what I inherited from the upstream Brandy BASIC.)
Last edited by Soruk on Wed Mar 06, 2019 1:37 pm, edited 2 times in total.

User avatar
Richard Russell
Posts: 804
Joined: Sun Feb 27, 2011 10:35 am
Location: Downham Market, Norfolk
Contact:

Re: Matrix Brandy BASIC V for Linux with SDL: V1.21.19 released

Post by Richard Russell » Sat Mar 16, 2019 10:34 am

I believe I'm right in thinking that Matrix Brandy supports right-to-left printing via VDU 23,16... so presumably it has no problems with RTL languages like Hebrew (given a suitable font). But what support, if any, does it provide for complex script languages like Arabic?

In BB4W and BBCSDL I support Arabic via an FNarabic() function which performs the necessary substitution of 'contextual forms', so that the final output is properly 'cursive'. But I've recently been asked whether it would be possible to support Urdu as well, and before trying to write a similar function for that language I thought I should check whether there's something I could 'borrow' from Matrix Brandy.

User avatar
fordp
Posts: 1016
Joined: Sun Feb 12, 2012 9:08 pm
Location: Kent, England
Contact:

Re: Matrix Brandy BASIC V for Linux with SDL: V1.21.19 released

Post by fordp » Sat Mar 16, 2019 6:15 pm

Has anybody tried building Matrix Brandy for RiscOS on a Pi?
FordP (Simon Ellwood)
Time is an illusion. Lunchtime, doubly so!

Post Reply