Page 1 of 1

BBC Basic for Next

Posted: Mon May 24, 2021 7:38 pm
by breakintoprogram
I've been using the core BBC Basic interpreter on a Z80-based breadboard computer I've been building, and after a chance conversation on Twitter a couple of weeks ago, wondered what it would take to port it to the Next.

It turns out quite a lot; the core interpreter has no graphics or sound support, and the editor and I/O features are custom to my breadboard computer, so those needed to be stripped out and rewritten.

It's in a fair state now. You can view the project here, and the history behind it, on my GitHub.
https://github.com/breakintoprogram/next-bbc-basic
Source and assembled nex files are available for download.

It currently supports two video modes; Mode 0 (ULA) and Mode 1 (Layer 2), with some graphics primitives coded (point, line, filled triangle and circle). The built-in Z80 assembler has been extended to support Z80N instructions, and there are a number of extra features that are Next specific. Full details are in the project files. The code can load and save .bbc files off the C: drive, and will happily load in BASIC files created on a BBC Micro.

It has been tested in CSpect and ZEsarUX, and a MiSTer running the Next core. I'll get around to testing it on the real deal when my KS2 unit lands. The intention is to eventually provide this as a ROM, but that will need some work, as I'll need to organise it into 2 x 16K ROM banks.

In the meantime, enjoy!

Re: BBC Basic for Next

Posted: Wed Jun 16, 2021 5:29 pm
by breakintoprogram
Bit of an status update on my project:
  • More * commands for the file system added
  • Two new modes added (320x256 40 column layer 2 and 640x256 80 column layer 2)
  • Sound (standard 3 AY channels only at the moment)
  • Bug fixes and performance tweaks
Source and nex files available on my GitHub
https://github.com/breakintoprogram/next-bbc-basic

Re: BBC Basic for Next

Posted: Thu Jun 24, 2021 9:21 pm
by funkheld
Hi good afternoon.
a good thing this bbc basic for the next.
but i find it cumbersome to enter this into the bbc basic program.

I would like to write the basic programs in text with the notepad ++.
how can I convert it to the bbc-basic?
how can i load them into the bbc-basic?

i would also like to use the banks of the next for storage and images.
16-47 32-95 $080000-$0fffff 512K 1st extra IC RAM (available on unexpanded Next)
48-79 96-159 $100000-$17ffff 512K 2nd extra IC RAM (only available on expanded Next)
80-111 160-223 $180000-$1fffff 512K 3rd extra IC RAM (only available on expanded Next)


thanks.

Re: BBC Basic for Next

Posted: Sun Jun 27, 2021 1:09 pm
by breakintoprogram
funkheld wrote:
Thu Jun 24, 2021 9:21 pm
Hi good afternoon.
a good thing this bbc basic for the next.
but i find it cumbersome to enter this into the bbc basic program.
Cheers! It's a fun project to work on.
funkheld wrote:
Thu Jun 24, 2021 9:21 pm
I would like to write the basic programs in text with the notepad ++.
how can I convert it to the bbc-basic?
how can i load them into the bbc-basic?
I'm not aware of a straightforward and reliable way of doing this. However, am considering adding a new feature, being able to load (and possibly save) .txt files in as well as .bbc files; .txt files can be created in any text editor.
funkheld wrote:
Thu Jun 24, 2021 9:21 pm
i would also like to use the banks of the next for storage and images.
16-47 32-95 $080000-$0fffff 512K 1st extra IC RAM (available on unexpanded Next)
48-79 96-159 $100000-$17ffff 512K 2nd extra IC RAM (only available on expanded Next)
80-111 160-223 $180000-$1fffff 512K 3rd extra IC RAM (only available on expanded Next)
That will be happening at some point in the future once I've got the code running as a ROM image.