About BBC Basic 4

bbc micro/electron/atom/risc os coding queries and routines
drfloyd
Posts: 380
Joined: Tue Jun 09, 2020 3:36 pm
Contact:

Re: About BBC Basic 4

Post by drfloyd » Mon Jun 15, 2020 3:53 pm

we can use Shadow RAM (i suppose for double buffering ?) without Assembler ?????

Naomasa298
Posts: 391
Joined: Sat Feb 16, 2013 12:49 pm
Contact:

Re: About BBC Basic 4

Post by Naomasa298 » Mon Jun 15, 2020 4:21 pm

drfloyd wrote:
Mon Jun 15, 2020 3:53 pm
we can use Shadow RAM (i suppose for double buffering ?) without Assembler ?????
Shadow RAM can be used to hold the screen without assembler, to give you more memory for your BASIC program. While you *can* use it for double buffering without assembler, to do that, you'll need to page it into the main memory map, which means you'll only have about 8.5k left for your program, and without assembler, you'll be limited to using the "legal" graphics commands.

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

Re: About BBC Basic 4

Post by Richard Russell » Mon Jun 15, 2020 4:57 pm

Naomasa298 wrote:
Mon Jun 15, 2020 4:21 pm
you'll be limited to using the "legal" graphics commands.
Using 'legal' graphics commands may feel like a limitation, but it will stand you in good stead if you think you might want to move on to using a Second Processor, or an ARM platform, or a 'modern' version of BBC BASIC like Matrix Brandy, BBC BASIC for Windows or BBC BASIC for SDL 2.0.

As I drew attention to in this thread, 'legal' graphics do support a limited form of sprite functionality, the possibilities of which I have yet to see fully explored.

drfloyd
Posts: 380
Joined: Tue Jun 09, 2020 3:36 pm
Contact:

Re: About BBC Basic 4

Post by drfloyd » Mon Jun 15, 2020 5:08 pm

is there a wiki for BASIC 2 & 4 BBC COMPUTER ?

Naomasa298
Posts: 391
Joined: Sat Feb 16, 2013 12:49 pm
Contact:

Re: About BBC Basic 4

Post by Naomasa298 » Mon Jun 15, 2020 5:26 pm


User avatar
richardtoohey
Posts: 3986
Joined: Thu Dec 29, 2011 5:13 am
Location: Tauranga, New Zealand
Contact:

Re: About BBC Basic 4

Post by richardtoohey » Mon Jun 15, 2020 11:30 pm

And don't forget that back in the 80s we got pretty good manuals and think the PDFs for most of those are online. :D

I always thought the BBC manuals were the best but having seen Commodore, Sinclair and Amstrad manuals from the same period - they were pretty good, too.

Again - look for scans of magazines like Beebug, The Micro User, and Acorn User. Really good content in those.

drfloyd
Posts: 380
Joined: Tue Jun 09, 2020 3:36 pm
Contact:

Re: About BBC Basic 4

Post by drfloyd » Tue Jun 23, 2020 12:46 pm

i will receive soon my BBC Master

And will try to program a first basic game : ELITE CHRONICLES :mrgreen:

Space role game :)

drfloyd
Posts: 380
Joined: Tue Jun 09, 2020 3:36 pm
Contact:

Re: About BBC Basic 4

Post by drfloyd » Tue Jun 23, 2020 10:09 pm

What is the total RAM available in BASIC 4 on MASTER 128 ?

Naomasa298
Posts: 391
Joined: Sat Feb 16, 2013 12:49 pm
Contact:

Re: About BBC Basic 4

Post by Naomasa298 » Tue Jun 23, 2020 10:12 pm

drfloyd wrote:
Tue Jun 23, 2020 10:09 pm
What is the total RAM available in BASIC 4 on MASTER 128 ?
28.5k in a shadow mode.

There would also be 64k of sideways ram, but if you want to use that, you have to resort to machine code.

drfloyd
Posts: 380
Joined: Tue Jun 09, 2020 3:36 pm
Contact:

Re: About BBC Basic 4

Post by drfloyd » Tue Jun 23, 2020 11:06 pm

28ko ! Oups...

a little short :)

Naomasa298
Posts: 391
Joined: Sat Feb 16, 2013 12:49 pm
Contact:

Re: About BBC Basic 4

Post by Naomasa298 » Tue Jun 23, 2020 11:21 pm

drfloyd wrote:
Tue Jun 23, 2020 11:06 pm
28ko ! Oups...

a little short :)
With proper techniques, 28k is more than enough. Most BBC B games were written with between 12-22k of memory to use.

User avatar
BigEd
Posts: 3452
Joined: Sun Jan 24, 2010 10:24 am
Location: West
Contact:

Re: About BBC Basic 4

Post by BigEd » Wed Jun 24, 2020 8:07 am

There's always BAS128, the version which uses sideways RAM to give you 64k, for a modest performance penalty. And then, as often mentioned in this context, a second processor running HIBASIC gives you 44k and a performance increase.

drfloyd
Posts: 380
Joined: Tue Jun 09, 2020 3:36 pm
Contact:

Re: About BBC Basic 4

Post by drfloyd » Wed Jun 24, 2020 1:39 pm

I try to train with emulator :)

is there a command to create an independant text window ? (for an adventure game with for example 4 lines available at the bottom)

User avatar
danielj
Posts: 8433
Joined: Thu Oct 02, 2008 5:51 pm
Location: Manchester
Contact:

Re: About BBC Basic 4

Post by danielj » Wed Jun 24, 2020 1:54 pm


drfloyd
Posts: 380
Joined: Tue Jun 09, 2020 3:36 pm
Contact:

Re: About BBC Basic 4

Post by drfloyd » Wed Jun 24, 2020 2:14 pm

thank you very much

it's so difficult to code en basic with emulator because of the pc keybord.... french keyboard....

drfloyd
Posts: 380
Joined: Tue Jun 09, 2020 3:36 pm
Contact:

Re: About BBC Basic 4

Post by drfloyd » Wed Jun 24, 2020 2:18 pm

i find a technic with blocnote + PASTE

User avatar
jms2
Posts: 2678
Joined: Mon Jan 08, 2007 6:38 am
Location: Derby, UK
Contact:

Re: About BBC Basic 4

Post by jms2 » Fri Jun 26, 2020 8:33 am

Hey drfloyd, you could help me answer a question that I thought of when I first got a home computer (aged 11, in 1983): BASIC is easy to learn because it is designed to be similar to normal English. But what if you don’t speak English - wouldn’t this make computer programming hard to get started in?

I’m interested in your thoughts on this - obviously you speak English well, so maybe it wasn’t a barrier for you, but would you say that it affected people’s interest in programming in France?

drfloyd
Posts: 380
Joined: Tue Jun 09, 2020 3:36 pm
Contact:

Re: About BBC Basic 4

Post by drfloyd » Fri Jun 26, 2020 5:35 pm

maybe that had a little influence. It was a little more difficult to remember and understand the English terms ... And French people where very bad in english in the 80'....

It was not really a barrier to me in 1982 when i tried to learn basic with ZX81.... even if i was bad in english...
Also, We where used to play with english games... START, GAME OVER, COIN UP :)

But anyway we had a big delay in computers knowledge in the 80' (and even in video games).

This is why Amstrad has established itself super easily in France with cheap and all in one machines. They "destroyed" Thomson in 2 years.

drfloyd
Posts: 380
Joined: Tue Jun 09, 2020 3:36 pm
Contact:

Re: About BBC Basic 4

Post by drfloyd » Fri Jun 26, 2020 5:41 pm

I have started my game in BASIC 4 :)

Not sure it will be fun... difficult to code a fun game in basic, but I try :mrgreen:

drfloyd
Posts: 380
Joined: Tue Jun 09, 2020 3:36 pm
Contact:

Re: About BBC Basic 4

Post by drfloyd » Sun Jun 28, 2020 12:20 pm

Basic 4 for Master 128 has more memory available for Basic programming than BAsic 2 on Model B ?

On emulator, with BBC MODEL B I am out of memory very quickly, but if I run the code on Master 128 no problem

Naomasa298
Posts: 391
Joined: Sat Feb 16, 2013 12:49 pm
Contact:

Re: About BBC Basic 4

Post by Naomasa298 » Sun Jun 28, 2020 1:11 pm

drfloyd wrote:
Sun Jun 28, 2020 12:20 pm
Basic 4 for Master 128 has more memory available for Basic programming than BAsic 2 on Model B ?

On emulator, with BBC MODEL B I am out of memory very quickly, but if I run the code on Master 128 no problem
On a model B with DFS, the main user memory runs from &1900 to &7FFF, which is 25.75k. However, the screen memory takes up some of that, from 1k in MODE7 to 20k in MODEs 1 and 2. So if you are in MODE2, you only have 5.75k.

On a Master, the main memory runs from &E00 to &7FFF, which is 28.5k. If you use a shadow mode (MODEs 128-135), the screen does *not* take up any memory, which means you have the whole 28.5k available.

drfloyd
Posts: 380
Joined: Tue Jun 09, 2020 3:36 pm
Contact:

Re: About BBC Basic 4

Post by drfloyd » Sun Jun 28, 2020 1:34 pm

oh my god only 5k !

On MASTER 128 I just have to start my program with :

10 MODE 128

?

Naomasa298
Posts: 391
Joined: Sat Feb 16, 2013 12:49 pm
Contact:

Re: About BBC Basic 4

Post by Naomasa298 » Sun Jun 28, 2020 2:16 pm

drfloyd wrote:
Sun Jun 28, 2020 1:34 pm
oh my god only 5k !

On MASTER 128 I just have to start my program with :

10 MODE 128

?
It depends on the screen mode you want to run in.

The shadow mode numbers are the normal screen modes +128.

MODE 0: 640x256 graphics, 80x32 characters, 2 colours, 20kB RAM
MODE 1: 320x256 graphics, 40x32 characters, 4 colours, 20kB RAM
MODE 2: 160x256 graphics, 20x32 characters, 8 colours, 20kB RAM
MODE 3: no graphics, 80x25 characters, 2 colours, 16kB RAM
MODE 4: 320x256 graphics, 40x32 characters, 2 colours, 10kB RAM
MODE 5: 160x256 graphics, 20x32 characters, 4 colours, 10kB RAM
MODE 6: no graphics, 40x25 characters, 2 colours, 8kB RAM
MODE 7: teletext, 40x25 characters, 8 colours, 1kB RAM

So if you want shadow MODE 2, the mode number is 130. Shadow MODE 7 is MODE 135.

The BBC starts up by default in MODE 7.

drfloyd
Posts: 380
Joined: Tue Jun 09, 2020 3:36 pm
Contact:

Re: About BBC Basic 4

Post by drfloyd » Sun Jun 28, 2020 2:37 pm

Ok, Thanks

I will use MODE 129... good definition for my RPG Game.

What does means 20KB ? I will have 28.5k available ?

I am also need to know the command to check the memory available for basic :)

Naomasa298
Posts: 391
Joined: Sat Feb 16, 2013 12:49 pm
Contact:

Re: About BBC Basic 4

Post by Naomasa298 » Sun Jun 28, 2020 2:53 pm

drfloyd wrote:
Sun Jun 28, 2020 2:37 pm
Ok, Thanks

I will use MODE 129... good definition for my RPG Game.

What does means 20KB ? I will have 28.5k available ?

I am also need to know the command to check the memory available for basic :)
If you use MODE128-135 then yes, you will have 28.5k on a BBC Master.

20K is the amount of memory the screen will use if you are NOT in a shadow mode.

PRINT HIMEM-PAGE will show you the available user member, not including the space used by your program and variables.

PRINT TOP-PAGE will show you the available remaining memory after your program has been loaded.

DIM P% -1:PRINT HIMEM-P% will show you the remaining memory after your program and variables.

User avatar
danielj
Posts: 8433
Joined: Thu Oct 02, 2008 5:51 pm
Location: Manchester
Contact:

Re: About BBC Basic 4

Post by danielj » Sun Jun 28, 2020 3:00 pm

It's worth noting, this is nothing to do with it being BASIC 4, this is the hardware architecture of the BBC Master as opposed to the BBC Micro. If you ran BASIC 2 in the BBC Master you'd still be able to use the shadow screen modes.

d.

drfloyd
Posts: 380
Joined: Tue Jun 09, 2020 3:36 pm
Contact:

Re: About BBC Basic 4

Post by drfloyd » Sun Jun 28, 2020 4:03 pm

Very clear, thank you for your help

I can continue my procédural game :)

drfloyd
Posts: 380
Joined: Tue Jun 09, 2020 3:36 pm
Contact:

Re: About BBC Basic 4

Post by drfloyd » Tue Jun 30, 2020 7:10 pm

Again the novice :)

I hace difficulties to edit Text on the real computer :

How to edit a line ?

I tried EDIT 10, not correct :mrgreen:

and how to list a little part of the program to check the code ?

I tried LIST 10-200, not correct :mrgreen:

Naomasa298
Posts: 391
Joined: Sat Feb 16, 2013 12:49 pm
Contact:

Re: About BBC Basic 4

Post by Naomasa298 » Tue Jun 30, 2020 7:16 pm

I don't know how to use *EDIT so I can't help you there. But to list part of the program, use LIST 10,200.

BITD, when you got a line wrong, you just typed it in again.

drfloyd
Posts: 380
Joined: Tue Jun 09, 2020 3:36 pm
Contact:

Re: About BBC Basic 4

Post by drfloyd » Tue Jun 30, 2020 7:34 pm

As I am writting a big program (28k) perhaps it's better to use PC emulator + text editor,

create a virtual disk,

and copy it on USB Gotek ?

Good tactic ?

Post Reply

Return to “programming”