BBC Basic for Next

Show us your work, thrill and amaze us :)

Moderator: Programming Moderators

User avatar
breakintoprogram
Posts: 7
Joined: Thu May 06, 2021 8:21 am

BBC Basic for Next

Postby breakintoprogram » Mon May 24, 2021 7:38 pm

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!
Attachments
E2LFIdkXIAsWjQa.jpeg
Loading a file
E2LFIdkXIAsWjQa.jpeg (43.69 KiB) Viewed 2574 times
E2LFLtTWUAApRfW.jpeg
BBC Basic for Next
E2LFLtTWUAApRfW.jpeg (52.15 KiB) Viewed 2574 times
E2LFZq5XoAETTWw.jpeg
Spinny cube demo
E2LFZq5XoAETTWw.jpeg (13.84 KiB) Viewed 2574 times

User avatar
breakintoprogram
Posts: 7
Joined: Thu May 06, 2021 8:21 am

Re: BBC Basic for Next

Postby breakintoprogram » Wed Jun 16, 2021 5:29 pm

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

funkheld
Posts: 27
Joined: Tue May 11, 2021 5:36 pm

Re: BBC Basic for Next

Postby funkheld » 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.

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.

User avatar
breakintoprogram
Posts: 7
Joined: Thu May 06, 2021 8:21 am

Re: BBC Basic for Next

Postby breakintoprogram » Sun Jun 27, 2021 1:09 pm

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.


Who is online

Users browsing this forum: No registered users and 1 guest