Skip to content

breakintoprogram/agon-bbc-basic

Repository files navigation

agon-bbc-basic

A port of BBC Basic for Z80 to the Agon

What is the Agon

Agon is a modern, fully open-source, 8-bit microcomputer and microcontroller in one small, low-cost board. As a computer, it is a standalone device that requires no host PC: it puts out its own video (VGA), audio (2 identical mono channels), accepts a PS/2 keyboard and has its own mass-storage in the form of a µSD card.

https://www.thebyteattic.com/p/agon.html

What is BBC Basic for Z80?

The original version of BBC Basic was written by Sophie Wilson at Acorn in 1981 for the BBC Micro range of computers, and was designed to support the UK Computer Literacy Project. R.T.Russell was involved in the specification of BBC Basic, and wrote his own Z80 version that was subsequently ported to a number of Z80 based machines. I highly recommend reading his account of this on his website for more details.

As an aside, R.T.Russell still supports BBC Basic, and has ported it for a number of modern platforms, including Android, Windows, and SDL, which are available from his website here.

Why am I doing this?

I've worked with Bernardo Kastrup aka The Byte Attic on another one of his projects, porting BBC Basic for Z80 to the Cerberus 2080. When he decided to design the Agon, he asked me whether I'd be interested in providing the firmware for it.

Assembling

This project is designed to be assembled and linked using the Zilog ZDS II toolkit - see the readme in MOS for more details.

NB:

  • The project is configured to download this to RAM at &40000 via the ZDS cable
  • Source level debugging not working correctly as this runs in a 64K Z80 segment in the eZ80 RAM

Loadig BBC Basic for Z80 on the Agon

  1. Download the binary bbcbasic.bin from agon-bbc-basic releases
  2. Copy it to the root directory of the Agon SD card
  3. Insert the SD card into the AGON and reset/boot it
  4. In the Agon MOS, check the file is on the SD card with a CAT or . command
  5. Type the following commands:
    • LOAD bbcbasic.bin
    • RUN
  6. You should then be greeted with the BBC Basic for Z80 prompt

Documentation

The AGON documentation can now be found on the Agon Light Documentation Wiki

License

This code is distributable under the terms of a zlib license. Read the file COPYING for more information.

Many thanks to R.T. Russell for open sourcing the source code, and David Given for facilitating this.

http://cowlark.com/2019-06-14-bbcbasic-opensource/index.html

The BASIC interpreter, as originally written by R.T. Russell and downloaded from David Given's GitHub page, has been modified slightly, either for compatibility reasons when assembling using the ZDS IDE, or for development reasons for this release.

The original files are: eval.z80, exec.z80, fpp.z80, patch.z80, main.z80, ram.z80 and sorry.z80, bbcbasic.txt, the license (COPYING) and all the files in the examples folder.

Any additions or modifications I've made to port this to the Agon have been released under the same licensing terms as the original code, along with any tools, examples or utilities contained within this project. Code that has been copied or inspired by other sources is clearly marked, with the appropriate accreditations.

Dean Belfield

Twitter: @breakintoprogram Blog: http://www.breakintoprogram.co.uk