Search found 428 matches

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.0 released
Replies: 750
Views: 36074

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.0 released
Replies: 750
Views: 36074

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.0 released
Replies: 750
Views: 36074

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.0 released
Replies: 750
Views: 36074

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.0 released
Replies: 750
Views: 36074

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.0 released
Replies: 750
Views: 36074

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.0 released
Replies: 750
Views: 36074

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.0 released
Replies: 750
Views: 36074

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.0 released
Replies: 750
Views: 36074

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.0 released
Replies: 750
Views: 36074

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.0 released
Replies: 750
Views: 36074

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...
by Soruk
Sun Sep 01, 2019 11:36 am
Forum: software & utilities for the pc, mac or unix
Topic: Matrix Brandy BASIC VI for Linux with SDL: V1.22.0 released
Replies: 750
Views: 36074

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

bakoulis wrote:
Sun Sep 01, 2019 9:43 am
with this commands compiled, but gives warnings.
Στιγμιότυπο από 2019-09-01 12-41-47.png
Unused variables, nothing to worry about.
by Soruk
Sun Sep 01, 2019 9:26 am
Forum: software & utilities for the pc, mac or unix
Topic: Matrix Brandy BASIC VI for Linux with SDL: V1.22.0 released
Replies: 750
Views: 36074

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

Hello, Today I tried to compile brandy on a spare computer with Debian Unstable. I'm using the latest version from github. I got this error: /usr/bin/ld: src/fileio.o: in function `fileio_eof': fileio.c:(.text+0x18c9): undefined reference to `kbd_pending' /usr/bin/ld: src/mos.o: in function `mos_os...
by Soruk
Fri Aug 30, 2019 7:12 am
Forum: software & utilities for the pc, mac or unix
Topic: Matrix Brandy BASIC VI for Linux with SDL: V1.22.0 released
Replies: 750
Views: 36074

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

dhg2 wrote:
Thu Aug 29, 2019 2:48 pm
Ouch!
Hope you recover soon.
Thank you. It is getting a bit better, but I need to get this injection done monthly for a while :shock: :cry:
by Soruk
Wed Aug 28, 2019 1:12 pm
Forum: software & utilities for the pc, mac or unix
Topic: Matrix Brandy BASIC VI for Linux with SDL: V1.22.0 released
Replies: 750
Views: 36074

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

Just a quick update: I haven't disappeared, it's just a bit difficult looking at a screen after having treatment for an eye injury which involved getting a needle stuck in my eyeball :shock: Also not very helpful when my day job is as a Linux sysadmin! Also, things haven't been completely silent, I'...
by Soruk
Fri Aug 16, 2019 9:09 am
Forum: software & utilities for the pc, mac or unix
Topic: Matrix Brandy BASIC VI for Linux with SDL: V1.22.0 released
Replies: 750
Views: 36074

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

On an ARM CPU there is no FPU support for floating-point numbers bigger than a 'double', and it's not usual for such numbers to be supported by a library (the performance would be unacceptable), so you will find that 'long double' is synonymous with 'double' on those CPUs (and indeed even on x86 CP...
by Soruk
Fri Aug 16, 2019 7:10 am
Forum: software & utilities for the pc, mac or unix
Topic: Matrix Brandy BASIC VI for Linux with SDL: V1.22.0 released
Replies: 750
Views: 36074

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

It depends upon how much work you wish to put in to make sure that the code is (a) portable and, (b) future-proof. None! My code isn't portable (and isn't intended to be); it is full of platform-specific features and compiler-specific features. Within the limited set of platforms and compilers with...
by Soruk
Thu Aug 15, 2019 2:21 pm
Forum: software & utilities for the pc, mac or unix
Topic: Matrix Brandy BASIC VI for Linux with SDL: V1.22.0 released
Replies: 750
Views: 36074

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

While not an issue yet for Matrix Brandy, I'd be using a specific handler for dlopen()ed calls when I get there - so there's no reason I can't make the check for that call before any other checks which should negate the overhead of checking the other calls first. Good point. Currently my code never...
by Soruk
Thu Aug 15, 2019 8:43 am
Forum: software & utilities for the pc, mac or unix
Topic: Matrix Brandy BASIC VI for Linux with SDL: V1.22.0 released
Replies: 750
Views: 36074

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

I've never really been comfortable with *-commands altering the behaviour of BASIC, to me a *-command is a call to the operating system, outside the confines of BASIC So although I agree that OSCLI is not ideal, SYS is worse in every way I can think of. While not an issue yet for Matrix Brandy, I'd...
by Soruk
Wed Aug 14, 2019 7:44 pm
Forum: software & utilities for the pc, mac or unix
Topic: Matrix Brandy BASIC VI for Linux with SDL: V1.22.0 released
Replies: 750
Views: 36074

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

Would it help at all to introduce an && syntax for long hex constants, with analogy to %%, so & is always to be interpreted as 32 bit? And, perhaps, as a signed 32 bit value, if that's what compatibility demands. I did actually look at trying to do this, but (like the int64 stuff) it had its tentac...
by Soruk
Tue Aug 13, 2019 6:10 pm
Forum: software & utilities for the pc, mac or unix
Topic: Matrix Brandy BASIC VI for Linux with SDL: V1.22.0 released
Replies: 750
Views: 36074

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

You really would need to call a function to do the sign extension from 32 to 64 bit integers, or not. Because you simply do not know whether &FFFFFFFF is supposed to represent - 1 or 4 294 967 295. A very interesting and informative read, thank you. In the case of gcc, when casting a 32-bit int to ...
by Soruk
Tue Aug 13, 2019 12:19 pm
Forum: software & utilities for the pc, mac or unix
Topic: Matrix Brandy BASIC VI for Linux with SDL: V1.22.0 released
Replies: 750
Views: 36074

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

but there's a small hiccup: Numbers are tokenised as they are entered into a program, and the tokenised version stored along with the lines (but hidden from LIST) That is indeed a complication. I quite often switch between HEX32 and HEX64 modes in my programs, but fortunately that is almost invaria...
by Soruk
Tue Aug 13, 2019 11:03 am
Forum: software & utilities for the pc, mac or unix
Topic: Matrix Brandy BASIC VI for Linux with SDL: V1.22.0 released
Replies: 750
Views: 36074

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

Indeed in a language like BASIC it's easy enough to discover the value of a number without ever assigning it to a variable, simply by printing it: PRINT &80000000 This tells me, in the default configuration of every version of BBC BASIC I have ever used, except Matrix Brandy (64) , that &80000000 i...
by Soruk
Tue Aug 13, 2019 7:17 am
Forum: software & utilities for the pc, mac or unix
Topic: Matrix Brandy BASIC VI for Linux with SDL: V1.22.0 released
Replies: 750
Views: 36074

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

I've modified it a bit to allow 32-bit ints to be set in the range &80000000-&FFFFFFFF So does that mean the following code prints 'not equal'? a% = &80000000 a%% = &80000000 IF a% = a%% PRINT "equal" ELSE PRINT "not equal" If so I'm not wildly enthusiastic about it, as you can imagine (on the 'pri...
by Soruk
Mon Aug 12, 2019 9:29 pm
Forum: software & utilities for the pc, mac or unix
Topic: Matrix Brandy BASIC VI for Linux with SDL: V1.22.0 released
Replies: 750
Views: 36074

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

Well, off the top of my head, @% has four bytes and each byte does something relating to output formatting. So, if @%% was non-zero, that would give you eight bytes, therefore four extra bytes, one of which could control the treatment of long or short integers. (Or, maybe, only 7 nibbles of @% are ...
by Soruk
Mon Aug 12, 2019 9:12 pm
Forum: software & utilities for the pc, mac or unix
Topic: Matrix Brandy BASIC VI for Linux with SDL: V1.22.0 released
Replies: 750
Views: 36074

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

(Hope I'm not speaking out of turn here, but I'd expect a mechanism like @% for format control: maybe an @%% would have the extra bits needed?) I'm not sure how that would be needed, to be fair I'm no expert on @% formats but to the best of my knowledge, with the exception of the spacing, they only...
by Soruk
Mon Aug 12, 2019 9:05 pm
Forum: software & utilities for the pc, mac or unix
Topic: Matrix Brandy BASIC VI for Linux with SDL: V1.22.0 released
Replies: 750
Views: 36074

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

Actually, that's going to be a horrible bug to fix... At the point it decodes the number, it doesn't know what type of storage it's going to be put in. Exactly. Although you don't have the problem in the reverse direction (printing the number in hex) I do: by the time a number is passed to my PRINT...
by Soruk
Mon Aug 12, 2019 3:56 pm
Forum: software & utilities for the pc, mac or unix
Topic: Matrix Brandy BASIC VI for Linux with SDL: V1.22.0 released
Replies: 750
Views: 36074

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

Hello, I've been playing around with the new sound feature a bit more, and I've noticed that there's a difference from how sound works on RISC OS. On RISC OS it's possible to play a sound which is completely silent by using 0 as the volume parameter for the SOUND command. This can be useful for cut...
by Soruk
Mon Aug 12, 2019 3:47 pm
Forum: software & utilities for the pc, mac or unix
Topic: Matrix Brandy BASIC VI for Linux with SDL: V1.22.0 released
Replies: 750
Views: 36074

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

Post (and link above) edited. That's better! I was expecting this, but there's a difference in how 64-bit integers behave when printed in hex compared with my BASICs. As you know, my BASICs perform automatic promotions between types so for example the value '-1' must necessarily always print the sa...
by Soruk
Mon Aug 12, 2019 3:41 pm
Forum: software & utilities for the pc, mac or unix
Topic: Matrix Brandy BASIC VI for Linux with SDL: V1.22.0 released
Replies: 750
Views: 36074

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

Sorry if this question is already answered. Is it possible to check whether there's something in the keyboard buffer in Matrix Brandy? I notice that ADVAL(-1) always returns 0. ADVAL(-1) should do it, it was one of the things I did with my updates to the keyboard handling. Do: BRANDY_BUILD_FLAGS=-D...