Search found 760 matches

by Richard Russell
Mon Jun 17, 2019 8:15 am
Forum: software
Topic: BBC BASIC timing comparison
Replies: 8
Views: 293

Re: BBC BASIC timing comparison

ESCAPE checking is done by internally calling INKEY(-113) I would not expect ESCape to be checked asynchronously (i.e. polled) like that: it's expensive, on some platforms it might detect the key being pressed even if BASIC doesn't have keyboard focus (for example using GetAsyncKeyState in Windows)...
by Richard Russell
Sun Jun 16, 2019 6:52 pm
Forum: programming
Topic: DRAW Command Syntax ?
Replies: 6
Views: 146

Re: DRAW Command Syntax ?

I generally find I learn better from a concrete working example. The potential problem is that you may never discover alternative ways of doing things. You cannot hope to cover every option using examples, it would need millions of them. So at some point you need a semi-formal description that allo...
by Richard Russell
Sun Jun 16, 2019 9:39 am
Forum: programming
Topic: DRAW Command Syntax ?
Replies: 6
Views: 146

Re: DRAW Command Syntax ?

BeebMan2018 wrote:
Sun Jun 16, 2019 7:36 am
I refered to the electron manual and it shows draw x,y like in the beeb manual
Here the syntax is given as DRAW <numeric>,<numeric> which is slightly more formal and confirms that the parameters can be any valid 'numeric'; such as a variable, a constant or (as in your case) an expression.
by Richard Russell
Fri Jun 14, 2019 4:38 pm
Forum: software
Topic: BBC BASIC timing comparison
Replies: 8
Views: 293

Re: BBC BASIC timing comparison

I also get 35 on a Pi3 and just for a laugh I tried it under ADFFS, which runs the 26bit SA version of BASIC under the JIT and got 43. A completely unfair comparison, of course, but on this Windows 10 laptop I get 22 cs, illustrating both the slowness of the RPi and how little interpreter speed typ...
by Richard Russell
Fri Jun 14, 2019 4:03 pm
Forum: software: other
Topic: The Entertainer and Software
Replies: 7
Views: 201

Re: The Entertainer and Software

I'm not even 100% sure the speed/timings of it is quite right either. Unrelated to the OP's question, you might want to compare it with entertainer.bbc supplied with all editions of BBC BASIC for SDL 2.0 which I think has the correct timings (speed is of course more subjective, Scott Joplin himself...
by Richard Russell
Fri Jun 14, 2019 8:44 am
Forum: programming
Topic: BBC BASIC mysteries and speculation
Replies: 22
Views: 291

Re: BBC BASIC mysteries and speculation

This bump-variable-to-list-head is a very interesting (but simple idea) - how much 6502 code would it be, I wonder It's not very much code in the x86 version, but I wonder whether, given the limited memory available in the BBC Micro, there would on average be enough variables for the saving in look...
by Richard Russell
Thu Jun 13, 2019 11:06 pm
Forum: programming
Topic: BBC BASIC mysteries and speculation
Replies: 22
Views: 291

Re: BBC BASIC mysteries and speculation

Richard Russell wrote:
Thu Jun 13, 2019 10:12 pm
one which I don't think has ever made it into any of Sophie's interpreters
I am informed that I am hopelessly out of date and that this feature has indeed been added to ARM BASIC, and works even better in conjunction with 'Synergistic Cache Technology' (whatever that is).
by Richard Russell
Thu Jun 13, 2019 10:12 pm
Forum: programming
Topic: BBC BASIC mysteries and speculation
Replies: 22
Views: 291

Re: BBC BASIC mysteries and speculation

Another 'obvious' optimisation, but one which I don't think has ever made it into any of Sophie's interpreters, is to take advantage of the 'variable chains' being linked-lists. The thing about a linked list is that it is very easy and fast to re-order the items in the list, in particular moving an ...
by Richard Russell
Thu Jun 13, 2019 9:31 pm
Forum: programming
Topic: BBC BASIC mysteries and speculation
Replies: 22
Views: 291

Re: VDU ?

Rich Talbot-Watkins wrote:
Thu Jun 13, 2019 8:30 pm
I honestly think it was a mistake.
I find that a very depressing thought, especially as it continues to have an impact on my products today. :cry:

Please don't tell me you also think Sophie failed to notice that there were 30 unused single-byte tokens! :roll:
by Richard Russell
Thu Jun 13, 2019 6:48 pm
Forum: programming
Topic: BBC BASIC mysteries and speculation
Replies: 22
Views: 291

Re: VDU ?

jgharston wrote:
Thu Jun 13, 2019 4:38 pm
overlapping command tokens with function tokens is such an obvious "thing"
So isn't it difficult to conclude that Sophie somehow missed it? Is there something we're all missing?
by Richard Russell
Thu Jun 13, 2019 1:33 pm
Forum: programming
Topic: BBC BASIC mysteries and speculation
Replies: 22
Views: 291

Re: BBC BASIC mysteries and speculation

they could have had two tables of execution addresses for tokens - one for statements and one for expression elements - and overlapped the index range. So is there a single dispatch table (for both functions and statements) in 6502 BASIC? That would 'explain' it, but it never occurred to me to do t...
by Richard Russell
Thu Jun 13, 2019 11:36 am
Forum: programming
Topic: BBC BASIC mysteries and speculation
Replies: 22
Views: 291

Re: VDU ?

I hope this isn't taking this thread too far off-topic, but whilst we're discussing tokens there are two big mysteries that I have never been able to get an explanation for in more than 30 years: As referred to earlier, what is the reason for the pseudo-variables (PTR, PAGE, TIME, LOMEM, HIMEM) each...
by Richard Russell
Thu Jun 13, 2019 11:10 am
Forum: programming
Topic: BBC BASIC mysteries and speculation
Replies: 22
Views: 291

Re: VDU ?

I assume BASIC V just won't let you turn the cursor off in an error handler? I expect this would work (it does in BB4W and BBCSDL): ON ERROR : OFF But - pure speculation - is it possible that some of these keywords had different names originally? I'm certain you're right. I don't have a specific me...
by Richard Russell
Thu Jun 13, 2019 11:00 am
Forum: programming
Topic: BBC BASIC mysteries and speculation
Replies: 22
Views: 291

Re: VDU ?

but I bet they hated it. I hated it so much I didn't implement it in BBC BASIC for Windows or BBC BASIC for SDL 2.0 (to be fair I didn't need to, since I use a palette even in 'non-paletted' modes, something which proved controversial when I tried to justify it here, but which I still think is bett...
by Richard Russell
Thu Jun 13, 2019 9:23 am
Forum: programming
Topic: BBC BASIC mysteries and speculation
Replies: 22
Views: 291

Re: VDU ?

I think it's a shame Sophie didn't think to squeeze ON and OFF into the original BBC BASIC to control the cursor; the tokens are already there, and I think the space could've been found in the ROM. I expect ON could have been implemented, as it's already a statement token, but I'm less sure about O...
by Richard Russell
Wed Jun 12, 2019 6:23 pm
Forum: off-topic
Topic: Intel 4004 Commemorative Clock
Replies: 2
Views: 85

Re: Intel 4004 Commemorative Clock

Apparently given to Intel employees in 1996 to commemorate 25 years since the introduction of the 4004 processor. I've programmed one of those (it was the CPU in a Pro-Log PROM programmer)! What sticks in my mind are the unusual mnemonics, like FIM for 'Fetch Immediate' and FIN for 'Fetch Indirect'.
by Richard Russell
Wed Jun 12, 2019 2:39 pm
Forum: software
Topic: BBC BASIC timing comparison
Replies: 8
Views: 293

Re: BBC BASIC timing comparison

Just for comparison, Matrix Brandy on RasPi 2 (don't have my Pi3+ handy from remote), gives 85. Thanks. Given that when (the original) Brandy was written the challenge was to make it as fast as Sophie's assembler version - through the use of 'tricks' to overcome the inherent overhead of being compi...
by Richard Russell
Mon Jun 10, 2019 8:15 am
Forum: programming
Topic: VDU ?
Replies: 21
Views: 468

Re: VDU ?

I assume the main driver (pun alert) behind this was to save a couple of bytes on longer VDU statements? Not really. VDU 23,0... writes values directly to the 6845 CRTC registers; disabling the text cursor/caret is just one of many effects it can have. Since it is specific to that particular chip i...
by Richard Russell
Sun Jun 09, 2019 9:06 am
Forum: programming
Topic: VDU ?
Replies: 21
Views: 468

Re: VDU ?

The Electron user guide, as I recall, tried to dissuade users from this form of the command and introduced some other sequence for turning off the cursor involving zeroes and ones. But guess what, I can't remember it! The advice "don't use this older method of turning off the cursor" had the exact ...
by Richard Russell
Sat Jun 08, 2019 1:34 pm
Forum: software
Topic: BBC BASIC timing comparison
Replies: 8
Views: 293

Re: BBC BASIC timing comparison

I consistently get a time of 35 centiseconds, I'm surprised it's that much faster than yours? I'm not, Sophie's BASICs have always had a reputation for speed. Even my assembler versions have never come close to hers, and of course when compiled from C there's an even bigger overhead. It's also sign...
by Richard Russell
Sat Jun 08, 2019 11:44 am
Forum: software
Topic: BBC BASIC timing comparison
Replies: 8
Views: 293

BBC BASIC timing comparison

There's an ongoing discussion about interpreter timings at the Raspberry Pi forums and I speculated there that Sophie's ARM interpreter (coded in assembler) almost certainly runs considerably faster than mine (compiled from C) on the same hardware. If somebody has a Raspberry Pi 3B (not +) with RISC...
by Richard Russell
Sat Jun 08, 2019 9:17 am
Forum: hardware
Topic: Any machine ever have combined raster and vector video system?EDITAn impossiblity I think?
Replies: 14
Views: 367

Re: Any machine ever have combined raster and vector video system?EDITAn impossiblity I think?

You can't vision mix SECAM either without decoding it either if I remember correct -- didn't French TV stations generally work in PAL and transcode to SECAM on transmission (at least, until component became the norm)? Indeed you're right on both counts. SECAM had very little going for it except bei...
by Richard Russell
Fri Jun 07, 2019 8:34 pm
Forum: hardware
Topic: Any machine ever have combined raster and vector video system?EDITAn impossiblity I think?
Replies: 14
Views: 367

Re: Any machine ever have combined raster and vector video system?EDITAn impossiblity I think?

I thought the Never Twice the Same Colour feature... NTSC really wasn't that bad, at least once electronics became more stable. I suspect its reputation for unstable colour stems in part from the early days of valve (vacuum tube) receivers. Yes, propagation factors could contribute phase errors too...
by Richard Russell
Fri Jun 07, 2019 6:20 pm
Forum: hardware
Topic: Any machine ever have combined raster and vector video system?EDITAn impossiblity I think?
Replies: 14
Views: 367

Re: Any machine ever have combined raster and vector video system?EDITAn impossiblity I think?

Is there a reason the BBC chose PAL over SECAM? I doubt that SECAM was ever considered for the UK, it's so clearly inferior to PAL. Obvious shortcomings are having half the vertical chroma resolution of PAL and having inferior monochrome compatibility (i.e. worse cross-luminance); I think it probab...
by Richard Russell
Fri Jun 07, 2019 11:59 am
Forum: hardware
Topic: Any machine ever have combined raster and vector video system?EDITAn impossiblity I think?
Replies: 14
Views: 367

Re: Any machine ever have combined raster and vector video system?EDITAn impossiblity I think?

Your explanation suggests instead that varying the intensity near an edging is equivalent to inserting an anti-aliasing filter to avoid going over half the sampling frequency. Precisely so! Many years ago I wrote an article emphasising the importance of looking at down-scaling of images in the freq...
by Richard Russell
Thu Jun 06, 2019 8:29 pm
Forum: hardware
Topic: Any machine ever have combined raster and vector video system?EDITAn impossiblity I think?
Replies: 14
Views: 367

Re: Any machine ever have combined raster and vector video system?EDITAn impossiblity I think?

I suppose I should have mentioned the original idea was partly about saving memory etc. Vector graphics support would itself require extra (expensive) hardware, such as a pair of high performance DACs as a minimum and probably a dedicated graphics processor. But you admitted that the hybrid raster-...
by Richard Russell
Thu Jun 06, 2019 5:21 pm
Forum: hardware
Topic: Any machine ever have combined raster and vector video system?EDITAn impossiblity I think?
Replies: 14
Views: 367

Re: Any machine ever have combined raster and vector video system?EDITAn impossiblity I think?

B3_B3_B3 wrote:
Thu Jun 06, 2019 5:10 pm
Wouldn't need more memory space (for the intensity levels)?
Of course! You'd probably want at least 6 bits per pixel.
Could it make mode 2 diagonals look like mode 0 or higher?
I would refer you to Mr. Nyquist (and sampling theory in general)!
by Richard Russell
Tue Jun 04, 2019 11:14 am
Forum: hardware
Topic: Any machine ever have combined raster and vector video system?EDITAn impossiblity I think?
Replies: 14
Views: 367

Re: Any machine ever have combined raster and vector video system?EDITAn impossiblity I think?

with vectors giving non-jagged lines and raster for colour and background You don't need vectors for "non-jagged" lines, you just need anti-aliassed graphics. So the more straightforward solution would be to use a raster-scanned display but with sufficient intensity resolution (and the appropriate ...
by Richard Russell
Sat Jun 01, 2019 9:24 am
Forum: software: other
Topic: Accuracy loss in Basic 4 compared to earlier Basics?
Replies: 22
Views: 498

Re: Accuracy loss in Basic 4 compared to earlier Basics?

Are we sure it is that the divide routine has been updated or could the order in which the calculations are done make a difference. Has that changed between basic 2 and basic 4. I can't believe that the order of execution changed. Operators of equal 'priority' (such as * and /) should always be eva...
by Richard Russell
Fri May 31, 2019 5:10 pm
Forum: hardware
Topic: Composite video from the BBC
Replies: 23
Views: 394

Re: Composite video from the BBC

Wow - I never knew that about BNCs - I was surprised I could still buy them in the shops actually! BNC is still one of the most common connectors in use in professional equipment today, and will probably remain so for many years. It's the standard connector for Serial Digital Interface (SDI or HD-S...