Search found 447 matches

by Soruk
Tue Nov 12, 2019 11:47 am
Forum: software & utilities for the pc, mac or unix
Topic: Matrix Brandy BASIC VI for Linux with SDL: V1.22.1 released
Replies: 787
Views: 41898

Re: Matrix Brandy BASIC VI for Linux with SDL: V1.22.1 released

Over on the BBC BASIC forum ( here ), I inadvertently uncovered a bug in GOTO parameter handling in Brandy (this code is untouched from the upstream source). Initially, from quick testing (GOTO x% and getting Syntax error) I came to the erroneous conclusion that Brandy didn't support variables as a ...
by Soruk
Mon Nov 11, 2019 3:30 pm
Forum: software & utilities for the pc, mac or unix
Topic: Proposal for BBC BASIC 'FOR lists'
Replies: 19
Views: 549

Re: Proposal for BBC BASIC 'FOR lists'

I like it. Similar to 'for' in the bash shell. (I wonder how hard that'll be to implement in Matrix Brandy) Cross-posting my reply in the other forum: Right now there's a lot going on in the real world that precludes me spending a lot of time on something that might be used a little, if at all, to ...
by Soruk
Fri Nov 08, 2019 3:46 pm
Forum: software & utilities for the pc, mac or unix
Topic: Proposal for BBC BASIC 'FOR lists'
Replies: 19
Views: 549

Re: Proposal for BBC BASIC 'FOR lists'

I like it. Similar to 'for' in the bash shell.

(I wonder how hard that'll be to implement in Matrix Brandy)
by Soruk
Wed Oct 16, 2019 6:40 pm
Forum: software & utilities for the pc, mac or unix
Topic: Matrix Brandy BASIC VI for Linux with SDL: V1.22.1 released
Replies: 787
Views: 41898

Re: Matrix Brandy BASIC VI for Linux with SDL: V1.22.1 released

dhg2 wrote:
Wed Oct 16, 2019 12:17 pm
Sorry to spam you
Nope, not spamming me. Real bug reports like these, especially with a test harness, are most welcome.
by Soruk
Wed Oct 16, 2019 12:32 pm
Forum: software & utilities for the pc, mac or unix
Topic: Matrix Brandy BASIC VI for Linux with SDL: V1.22.1 released
Replies: 787
Views: 41898

Re: Matrix Brandy BASIC VI for Linux with SDL: V1.22.1 released

Thanks for looking into it. Sorry to spam you, but, I notice now that there seems to be some trouble with stuff getting drawn outside of the graphics window. Tested with this code: MODE 13 PROCgcol(0,0,0):RECTANGLE FILL 0,0,1280,1024 VDU 24, 100;100;400;400; PROCgcol(0,0,128):RECTANGLE FILL 0,0,128...
by Soruk
Wed Oct 16, 2019 9:33 am
Forum: software & utilities for the pc, mac or unix
Topic: Matrix Brandy BASIC VI for Linux with SDL: V1.22.1 released
Replies: 787
Views: 41898

Re: Matrix Brandy BASIC VI for Linux with SDL: V1.22.1 released

Hello, I notice that if you try to draw text at the location of the graphics cursor (with VDU 5 and then PRINT), and if the current graphics colour is black, no text is drawn. Tested with this program: MODE 1 PROCtextdraw(100,100,"Matrix Brandy BBC BASIC") END DEF PROCtextdraw(x%,y%,s$) LOCAL xx%,y...
by Soruk
Tue Oct 15, 2019 4:39 pm
Forum: software & utilities for the pc, mac or unix
Topic: Matrix Brandy BASIC VI for Linux with SDL: V1.22.1 released
Replies: 787
Views: 41898

Re: Matrix Brandy BASIC VI for Linux with SDL: V1.22.1 released

Hello, I notice that if you try to draw text at the location of the graphics cursor (with VDU 5 and then PRINT), and if the current graphics colour is black, no text is drawn. Good spot. Yup, need to fix that. Edit: The reason this is happening is, that it's building the character cell, blitting tr...
by Soruk
Mon Oct 14, 2019 10:23 am
Forum: software & utilities for the pc, mac or unix
Topic: Matrix Brandy BASIC VI for Linux with SDL: V1.22.1 released
Replies: 787
Views: 41898

Re: Matrix Brandy BASIC VI for Linux with SDL: V1.22.1 released

Conversely, if addresses are signed at 32-bits then you can end up with the odd situation where HIMEM < PAGE. That can't be right either. But that's always been true in BBC BASIC, in principle, since the only variables available to hold addresses/pointers are signed integers. Theoretically even Aco...
by Soruk
Mon Oct 14, 2019 9:34 am
Forum: software & utilities for the pc, mac or unix
Topic: Matrix Brandy BASIC VI for Linux with SDL: V1.22.1 released
Replies: 787
Views: 41898

Re: Matrix Brandy BASIC VI for Linux with SDL: V1.22.1 released

Thanks Richard, I actually wasn't aware that Matrix Brandy had been changed to use true 64 bit addresses. (I've been a bit busy lately and haven't been following things as closely. I should have read up more before posting, sorry) This is a really cool new feature and I'm excited to learn that it's...
by Soruk
Mon Oct 14, 2019 8:47 am
Forum: software & utilities for the pc, mac or unix
Topic: Matrix Brandy BASIC VI for Linux with SDL: V1.22.1 released
Replies: 787
Views: 41898

Re: Matrix Brandy BASIC VI for Linux with SDL: V1.22.1 released

Is that really what you mean? Suppose that, on a 32-bit platform, HIMEM is &C0000000 (not possible in Windows, normally, but definitely possible in 32-bit Linux or Android). Since it's a 32-bit platform it should be legitimate to assign HIMEM to a 32-bit integer variable: Himem% = HIMEM which means...
by Soruk
Sat Oct 12, 2019 7:46 pm
Forum: software & utilities for the pc, mac or unix
Topic: Matrix Brandy BASIC VI for Linux with SDL: V1.22.1 released
Replies: 787
Views: 41898

Re: Matrix Brandy BASIC VI for Linux with SDL: V1.22.1 released

So you ought to be able safely to use 32-bit pointers as long as (1) you limit your memory usage, and (2) all addresses that BASIC programs wind up seeing are relative and not absolute. BASIC doesn't mind negative addresses anyway -- although it won't let you specify the unsigned equivalent of a nu...
by Soruk
Sat Oct 12, 2019 9:29 am
Forum: software & utilities for the pc, mac or unix
Topic: Matrix Brandy BASIC VI for Linux with SDL: V1.22.1 released
Replies: 787
Views: 41898

Re: Matrix Brandy BASIC VI for Linux with SDL: V1.22.1 released

I have family over this weekend but will address @dhg2's issue in the coming days. What BBC BASIC for SDL 2.0 does is to ensure that on a 32-bit platform you can always use 32-bit integer variables to hold addresses (pointers), which is what you would expect and is compatible with other programming ...
by Soruk
Mon Oct 07, 2019 12:12 pm
Forum: software & utilities for the pc, mac or unix
Topic: Matrix Brandy BASIC VI for Linux with SDL: V1.22.1 released
Replies: 787
Views: 41898

Re: Matrix Brandy BASIC VI for Linux with SDL: V1.22.1 released

New changes committed: Initial attempt at console-mode text builds for Windows built in Cygwin. Good news: It builds, and runs. Bad news: It echoes back everything typed a second time. Edit: Fixed. Edit 2: Windows nightly builds now include the "brandy" SDL version and both "sbrandy" and "tbrandy" t...
by Soruk
Wed Sep 25, 2019 11:47 am
Forum: software & utilities for the pc, mac or unix
Topic: Matrix Brandy BASIC VI for Linux with SDL: V1.22.1 released
Replies: 787
Views: 41898

Re: Matrix Brandy BASIC VI for Linux with SDL: V1.22.1 released

Other recent updates include ensuring that PAGE, HIMEM and friends all return positive numbers on 32-bit hardware (as they now return 64-bit ints). Thanks to @jgharston to pointing that one out over on github.
by Soruk
Sat Sep 21, 2019 5:02 am
Forum: software & utilities for the pc, mac or unix
Topic: Matrix Brandy BASIC VI for Linux with SDL: V1.22.1 released
Replies: 787
Views: 41898

Re: Matrix Brandy BASIC VI for Linux with SDL: V1.22.1 released

dhg2 wrote:
Fri Sep 20, 2019 8:50 pm
I feel bad saying this after you added the option feature for my sake, but now that I'm aware of the proper way of doing things, it seems that it might be best if you removed the option to restore the previous brandy VAL behaviour.
I've reverted that change, and pushed that to git.
by Soruk
Fri Sep 20, 2019 3:13 pm
Forum: software & utilities for the pc, mac or unix
Topic: Matrix Brandy BASIC VI for Linux with SDL: V1.22.1 released
Replies: 787
Views: 41898

Re: Matrix Brandy BASIC VI for Linux with SDL: V1.22.1 released

dhg2 wrote:
Fri Sep 20, 2019 1:18 pm
That would be cool, if it's not a hassle for you to implement. Perhaps it would be good as a compile time option.
Pull the latest git, and the old behaviour can be enabled with

Code: Select all

SYS "Brandy_ExtendVAL",1
by Soruk
Fri Sep 20, 2019 12:41 pm
Forum: software & utilities for the pc, mac or unix
Topic: Matrix Brandy BASIC VI for Linux with SDL: V1.22.1 released
Replies: 787
Views: 41898

Re: Matrix Brandy BASIC VI for Linux with SDL: V1.22.1 released

dhg2 wrote:
Fri Sep 20, 2019 12:37 pm
Bug fix for VAL - it should ONLY handle decimal numbers (not hex or binary)
I think that's unfortunate. That was a pretty nice feature that I used quite a bit. Though I can understand why you removed it.
I could make it switchable, in the same way I've made other features tunable.
by Soruk
Fri Sep 20, 2019 10:45 am
Forum: software & utilities for the pc, mac or unix
Topic: Matrix Brandy BASIC VI for Linux with SDL: V1.22.1 released
Replies: 787
Views: 41898

Re: Matrix Brandy BASIC VI for Linux with SDL: V1.22.1 released

Subsequent to the V1.22.1 release, I have now merged the 64-bit int capability to the master branch.

In addition, the relative addressing memory model is now gone, PAGE, HIMEM (etc) and indirection operators now use actual memory locations.
by Soruk
Fri Sep 20, 2019 10:35 am
Forum: software & utilities for the pc, mac or unix
Topic: Matrix Brandy BASIC VI for Linux with SDL: V1.22.1 released
Replies: 787
Views: 41898

Matrix Brandy BASIC VI for Linux with SDL: V1.22.1 released

Hi, I've put together release V1.22.1 of Matrix Brandy. Changes include: - Make the old BASIC I-IV compatible integer mathematics available via a run-time switchable setting. - Integer addition and subtraction will now return integer if it fits, else a float. (Legacy mode: unchanged, will always ret...
by Soruk
Fri Sep 13, 2019 9:04 am
Forum: software & utilities for the pc, mac or unix
Topic: Matrix Brandy BASIC VI for Linux with SDL: V1.22.1 released
Replies: 787
Views: 41898

Re: Matrix Brandy BASIC VI for Linux with SDL: V1.22.0 released

I'm noticing a problem with the latest brandy from github. WAIT with a number parameter doesn't seem to work anymore. Typing, for example, "WAIT 1000" at the prompt just returns instantly. Whoops. The variable holding the current centisecond timer value was a signed 32-bit int - and is now wrapping...
by Soruk
Tue Sep 10, 2019 6:05 pm
Forum: software & utilities for the pc, mac or unix
Topic: Matrix Brandy BASIC VI for Linux with SDL: V1.22.1 released
Replies: 787
Views: 41898

Re: Matrix Brandy BASIC VI for Linux with SDL: V1.22.0 released

Maybe one day I'll try your technique and also "hope for the best" but I prefer not to take that sort of risk. I discourage the use of indirection in BB4W and BBCSDL, the misuse of which is the easiest way to trigger a segfault, and recommend using structures instead. They provide all the protectio...
by Soruk
Tue Sep 10, 2019 5:35 pm
Forum: software & utilities for the pc, mac or unix
Topic: Matrix Brandy BASIC VI for Linux with SDL: V1.22.1 released
Replies: 787
Views: 41898

Re: Matrix Brandy BASIC VI for Linux with SDL: V1.22.0 released

I just report the error, then siglongjmp() to the error handler (from ON ERROR) or back to the immediate mode loop. Yes, I understand how errors are handled (I do the same), I meant how do you intercept the segfault? Are you using 'sigaction()'? It's this at the man page that scares me: " Applicati...
by Soruk
Tue Sep 10, 2019 5:08 pm
Forum: software & utilities for the pc, mac or unix
Topic: Matrix Brandy BASIC VI for Linux with SDL: V1.22.1 released
Replies: 787
Views: 41898

Re: Matrix Brandy BASIC VI for Linux with SDL: V1.22.0 released

Admittedly in a programming language like BBC BASIC where a segfault can be caused by something as simple as ?12345678 = 0 crashing is arguably rather unfriendly and an error message like 'Address exception' is more informative, especially if it's able to tell you at what line the fault was trigger...
by Soruk
Tue Sep 10, 2019 2:28 pm
Forum: software & utilities for the pc, mac or unix
Topic: Matrix Brandy BASIC VI for Linux with SDL: V1.22.1 released
Replies: 787
Views: 41898

Re: Matrix Brandy BASIC VI for Linux with SDL: V1.22.0 released

I've reworked the signal handler and longjmp stuff to allow the same signal to be hit more than once - in particular SIGSEGV (which raises error "Address exception"). Up until now, reads and writes have been checked beforehand to see if it's in our workspace, or specific areas made available (e.g. G...
by Soruk
Mon Sep 09, 2019 11:14 am
Forum: software & utilities for the pc, mac or unix
Topic: Matrix Brandy BASIC VI for Linux with SDL: V1.22.1 released
Replies: 787
Views: 41898

Re: Matrix Brandy BASIC VI for Linux with SDL: V1.22.0 released

sweh wrote:
Sun Sep 08, 2019 4:06 pm
And if I compile 32bit then it loads but I get an "Address exception at line 110", the "Brandy_GetVideoDriver" SYS call.
This should now be fixed! Sorry about that.
by Soruk
Mon Sep 09, 2019 11:07 am
Forum: software & utilities for the pc, mac or unix
Topic: Matrix Brandy BASIC VI for Linux with SDL: V1.22.1 released
Replies: 787
Views: 41898

Re: Matrix Brandy BASIC VI for Linux with SDL: V1.22.0 released

A recent merge from @jgharston has removed the offsetting used for Brandy's memory space. I'm surprised that can happen, especially without you knowing. Is it because you are sharing StarDot's github account that he is able to make changes? I'm hoping nothing similar can happen to BBC BASIC for SDL...
by Soruk
Mon Sep 09, 2019 6:05 am
Forum: software & utilities for the pc, mac or unix
Topic: Matrix Brandy BASIC VI for Linux with SDL: V1.22.1 released
Replies: 787
Views: 41898

Re: Matrix Brandy BASIC VI for Linux with SDL: V1.22.0 released

A recent merge from @jgharston has removed the offsetting used for Brandy's memory space. I'm surprised that can happen, especially without you knowing. Is it because you are sharing StarDot's github account that he is able to make changes? I'm hoping nothing similar can happen to BBC BASIC for SDL...
by Soruk
Sun Sep 08, 2019 7:06 pm
Forum: software & utilities for the pc, mac or unix
Topic: Matrix Brandy BASIC VI for Linux with SDL: V1.22.1 released
Replies: 787
Views: 41898

Re: Matrix Brandy BASIC VI for Linux with SDL: V1.22.0 released

I see what has happened. A recent merge from @jgharston has removed the offsetting used for Brandy's memory space. Unfortunately this has broken both 64-bit builds and the way I was passing back strings from SYS.

This should be fixed in my add_64int branch, I'll take a closer look at that tomorrow.
by Soruk
Fri Sep 06, 2019 10:11 pm
Forum: software & utilities for the pc, mac or unix
Topic: Matrix Brandy BASIC VI for Linux with SDL: V1.22.1 released
Replies: 787
Views: 41898

Re: Matrix Brandy BASIC VI for Linux with SDL: V1.22.0 released

Hello, I think I might have found a bug in matrix brandy. For fun last night I wrote a program that makes an approximation of a sine/cosine curve. While I was doing that, I noticed that it behaved incorrectly on the latest version of matrix brandy, but it behaves correctly on older versions of matr...
by Soruk
Sun Sep 01, 2019 9:12 pm
Forum: software & utilities for the pc, mac or unix
Topic: Matrix Brandy BASIC VI for Linux with SDL: V1.22.1 released
Replies: 787
Views: 41898

Re: Matrix Brandy BASIC VI for Linux with SDL: V1.22.0 released

Unused variables, nothing to worry about. It's undesirable nevertheless, because if people get used to seeing warnings every time it's compiled they may not notice if a new (potentially more important) one appears. Of course, I completely agree. Right now the keyboard code is in a state of flux, an...