[img] Z80 BBC BASIC for the ZX Spectrum
MDFS::Software.Spectrum.BBCBasic.Docs.Back/htm Search  

BBC BASIC Background

I started writing BBC BASIC for the Spectrum around about 1985. At University in 1988 I discovered that Z80 BBC BASIC actually existed and obtained a copy with a second-hand Z80 CoProcessor. After sucessfully patching it to run on the Z80 CoPro using the BBC file I/O instead of CPM's, I turned to converting it to run on the Spectrum. The intention was that it would reside in ROM in low memory, and I even got as far as building most of the external ROMBox to plug a programmed EPROM into.

Unfortunately, the cycle of coding, blow EPROM, test, coding again didn't make for efficient programming, and also quickly gobbled up my available EPROMs. I intended to extend the ROMBox to have sideways RAM, but never got around to it. Also, University courses got in the way of getting much work done.

In about 1990 I obtained a Spectrum emulator - Speculator for RISC OS. I was doing a lot of work with Z80 BBC BASIC then, it was when I wrote Z80Tube, but it never occured to me to complete the conversion I had started.

In about 2000 I was tinkering with Speculator and the Z80Tube interface code and put together a small host interface core that ran on the Spectrum. It prompted for *commands and executed them. I could examine and modify memory, and execute code.

In January 2002 I sat down in ernest to complete the conversion. "In ernest" with my current job means spending about a hour a week, so taking a couple of months. At 03:01 GMT on 15-Mar-2002 I ran the relocator, assembled the host interface code, joined the resultant files together and loaded them into Warm Silence's Z80Em. It worked! PRINT "Hello" - it worked! A bit of tinkering with the keyboard map to get ~ and: PRINT ~PAGE,~HIMEM - it worked! Wow! If it hadn't been 3 in the morning I would have been jubilant.

It starts up like this:
Sinclair Spectrum 48K

Acorn BBC BASIC Version 2.20
(C) Copyright R.T.Russell 1983

and so far everything works. So far I've implemented tape access and the text VDU. The next task is to implement the rest of the MOS's VDU and FILE interface.

Watch this space!

Best viewed with Any Browser Valid HTML 4.0! Authored by J.G.Harston
Last update: 24-Feb-2004