Go to advanced search

by RichardRussell
Thu Feb 20, 2020 9:19 am
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 667
Views: 70337

Re: Introduction to BBC BASIC

The SN76489 chip they used could only accept an 8-bit control input Its interface to the CPU may well have been an 8-bit port, but the tone 'divisor' registers which determine the final frequency are 10 bits, so there isn't inherently a limit of 256 different notes. However with a clock frequency o...
by RichardRussell
Wed Feb 19, 2020 10:07 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 667
Views: 70337

Re: Introduction to BBC BASIC

Why does the note range not go lower ? I think it's because Acorn decided to use only a single byte (0-255) to represent the pitch, so with quarter-semitone steps you only get just over 5 octaves total range. As to why they chose ¼-semitone steps (rather than, say, half) again I don't know for sure...
by RichardRussell
Wed Feb 19, 2020 6:47 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 667
Views: 70337

Re: Introduction to BBC BASIC

SYS "VirtualProtect", ftab% AND -&1000, &2000, &40, ^I% TO I% IF I% = 0 ERROR 100, "Cannot make memory image writable" As you can see, and as I suspected, it patches the executable in memory. Hence not an option for BBCSDL (not a sensible option ever, but I was evidently persuaded to do it for BB4W...
by RichardRussell
Wed Feb 19, 2020 4:56 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 667
Views: 70337

Re: Introduction to BBC BASIC

No ' FNfreqout(f) ' for SDL ? I don't remember what that is, you'll have to remind me. I know I did some horrible hacks involving actually patching the code of BB4W (e.g. the HQSOUND library), maybe it was one of them. Obviously you cannot 'patch' the code of a multi-platform product such as BBCSDL...
by RichardRussell
Wed Feb 19, 2020 9:30 am
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 667
Views: 70337

Re: Introduction to BBC BASIC

Where may one find the documentation on using the ' stops ' ? It's described under Star Commands here , the syntax is: *VOICE channel,voice (where channel is 0-3 and voice is 0-7). The eight 'voices' are based on those used by my ancient Z80 Music program, which was a 4-voice polyphonic synthesiser...
by RichardRussell
Wed Feb 19, 2020 9:08 am
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 667
Views: 70337

Re: Introduction to BBC BASIC

I think it may have been due to hardware capabilities. The Envelope function (IIRC) was a feature of the sound chip used on the BBC Micro. I don't believe that's right. My understanding is that ENVELOPE was implemented entirely in software, i.e. in the BBC Micro's MOS, not in the sound chip. If you...
by RichardRussell
Tue Feb 18, 2020 10:07 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 667
Views: 70337

Re: Introduction to BBC BASIC

Out of curiosity , how and when did the BBCBasic SOUND morph into how it works now as opposed to as explained here The 'morphing' was in the other direction! What you have linked to describes the SOUND statement in RISC OS, which is quite different from how SOUND originally worked on the earlier BB...
by RichardRussell
Sat Feb 15, 2020 2:33 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 667
Views: 70337

Re: Introduction to BBC BASIC

I've released version 1.10a of BBC BASIC for SDL 2.0 - the cross-platform programming language for Windows, MacOS, Linux, Raspbian, Android and iOS. The changes in this version are as follows: BASIC Interpreter / Run Time Engine Bundled the Box2D physics engine (as famously used by the Angry Birds g...
by RichardRussell
Tue Feb 04, 2020 3:44 pm
Forum: Troubleshooting
Topic: Extreame screen tearing on Raspberry Pi 4
Replies: 30
Views: 4772

Re: Extreame screen tearing on Raspberry Pi 4

This seems to be a significant flaw of the Raspberry Pi 4. To try to quantify what is going on I have produced a couple of 'waterfall' plots of Vsync timing. The horizontal timebase in each case is 100 milliseconds across the width of the plot, so a 'perfect' 60 Hz refresh would result in 6 vertical...
by RichardRussell
Mon Jan 20, 2020 9:31 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 667
Views: 70337

Re: Introduction to BBC BASIC

Very nice screenshots :) I did a lot of MODE 7 stuff in the old days. Used your BASIC a lot on PC and RM Nimbus. The key to achieving a realistic teletext display is the Bedstead font which solves the problem of emulating the non-square pixels of the BBC Micro's MODE 7 on a display with square pixe...
by RichardRussell
Mon Jan 20, 2020 2:01 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 667
Views: 70337

Re: Introduction to BBC BASIC

Some screen shots from the Ceefax simulator:
Ceefax100.png
Ceefax100.png (46.26 KiB) Viewed 1546 times
Ceefax122.png
Ceefax122.png (45.23 KiB) Viewed 1546 times
Ceefax137.png
Ceefax137.png (37.83 KiB) Viewed 1546 times
by RichardRussell
Sun Jan 12, 2020 1:38 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 667
Views: 70337

Re: Introduction to BBC BASIC

I've released version 1.09a of BBC BASIC for SDL 2.0 - the cross-platform programming language for Windows, MacOS, Linux, Raspbian, Android and iOS. The changes in this version are as follows: BASIC Interpreter / Run Time Engine Worked around a regression in SDL 2.0.10, which caused the fern demo no...
by RichardRussell
Thu Dec 05, 2019 12:39 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 667
Views: 70337

Re: Introduction to BBC BASIC

RichardRussell wrote:
Sun Dec 01, 2019 11:10 am
Added 'bezierfit.bbc' (in the examples/general folder) to demonstrate fitting a smooth curve to a set of data points. This program is also compatible with BBC BASIC for Windows.
Image
by RichardRussell
Sun Dec 01, 2019 11:10 am
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 667
Views: 70337

Re: Introduction to BBC BASIC

Just released, version 1.08a of BBC BASIC for SDL 2.0 - the cross-platform programming language for Windows, MacOS, Linux, Raspbian, Android and iOS. The changes in this version are as follows: BASIC Interpreter / Run Time Engine The version of SDL supplied with the Windows, MacOS and iOS editions h...
by RichardRussell
Sun Nov 10, 2019 6:23 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 667
Views: 70337

Re: Introduction to BBC BASIC

Congratulations are due to David Williams (aka BasicBoy) whose BBC BASIC game 'Tyoob' has won Second Prize at the recent SyntaxBomb game coding competition . Here's a YouTube video of the game running on a Raspberry Pi 3 (apparently it runs rather more smoothly on a RPi 4). David has had great succe...
by RichardRussell
Mon Nov 04, 2019 12:04 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 667
Views: 70337

Re: Introduction to BBC BASIC

I found a rather nasty bug yesterday, which (in admittedly statistically unlikely circumstances) could cause the INSTALL statement to hang. The source at GitHub has been updated with the fix.
by RichardRussell
Thu Oct 31, 2019 3:37 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 667
Views: 70337

Re: Introduction to BBC BASIC

In 32-bit mode on ARM "long double" is the same as "double", that is 64-bits. In 64-bit mode, ARM "long double" is 128-bits! Indeed (and the 128-bit 'long double' is currently a software emulation) which is why I redefine those 'long double' library functions to their ordinary 'double' equivalents....
by RichardRussell
Thu Oct 31, 2019 2:02 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 667
Views: 70337

Re: Introduction to BBC BASIC

Now down to a fabsl fabs warning in bbceval.c Looks like long double instead of long, but that's for fixing tmr. I don't think I get any warnings when compiling for iOS (which is Clang/aarch64), at least none that Xcode draws to my attention. The redefining of fabsl to fabs (and others similar) is ...
by RichardRussell
Thu Oct 31, 2019 12:18 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 667
Views: 70337

Re: Introduction to BBC BASIC

Got this warning on main, exec, eval, smb_asm, but every other c file compiled individually on Gentoo64. That's likely to be due to this code in bbc.h : // Register globals: #ifdef __llvm__ extern signed char *esi ; // Program pointer extern heapptr *esp ; // Stack pointer #else #ifdef __i386__ reg...
by RichardRussell
Thu Oct 31, 2019 9:29 am
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 667
Views: 70337

Re: Introduction to BBC BASIC

Could BBC basic be made into a baremetal version? In principle, certainly. Right from the very start (i.e. on the BBC Micro in 1981) a clear distinction was made, and a well-defined interface established, between the 'language' and the 'operating system'. This was rare in the 8-bit home computer da...
by RichardRussell
Wed Oct 30, 2019 2:07 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 667
Views: 70337

Re: Introduction to BBC BASIC

Is there a aarch64 version of BBC Basic? The iOS edition of BBC BASIC is aarch64 (as mandated by Apple) but with so few RPis running a 64-bits OS I've not bothered to support that configuration. Ok, found the source on github but no instruction on how to make? The makefile is in the bin/raspi direc...
by RichardRussell
Sun Oct 27, 2019 5:34 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 667
Views: 70337

Re: Introduction to BBC BASIC

Unless someone is paying, the audience for any program I write is precisely one, me. I can't believe that's true. You surely sometimes write 'informative' programs, e.g. a program designed to illustrate the capabilities of a language or a coding tecnnique, without expecting to be paid? That's what ...
by RichardRussell
Thu Oct 24, 2019 1:54 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 667
Views: 70337

Re: Introduction to BBC BASIC

Nah, I want the real stuff The USNO UCAC4 star catalog with 113 millions stars to magnitude 16 ! It depends on what you consider the audience for the program to be. Most 'hobby' astronomers aren't going to be interested in that, or have a telescope capable of imaging most of those stars, anyway (to...
by RichardRussell
Thu Oct 24, 2019 11:48 am
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 667
Views: 70337

Re: Introduction to BBC BASIC

Where does that BBC BASIC get it's planetarium data from? I've included web links in the source code, preceding the blocks of DATA statements at the end of the program. No guarantees that they are the 'best' sources nor that they are the most accurate, just ones that Google found. As I mentioned, t...
by RichardRussell
Tue Oct 22, 2019 12:21 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 667
Views: 70337

Re: Introduction to BBC BASIC

Some screenshots from the 'planetarium' program featured in the recent release:
skybaby1_small.png
skybaby1_small.png (123.45 KiB) Viewed 3842 times
skybaby2_small.png
skybaby2_small.png (169.35 KiB) Viewed 3842 times
skybaby3.png
skybaby3.png (250.4 KiB) Viewed 3842 times

Go to advanced search