Jump to content
  • Advertisement
  • entries
    222
  • comments
    606
  • views
    591811

Z80 BBC BASIC - Emulated on Windows

Sign in to follow this  
benryves

1543 views

I've started working with the actual BBC BASIC interpreter. As it won't run in its current state on the TI calculator (it relies on a jump table at &FF80..&FFFF to interact with the host, which is protected) I'm using the Z80 emulator I wrote for Cogwheel to try and puzzle out what the host interface should be doing from the relative sanity of C# code (the jump table is populated with OUT (n), A instructions which are subsequently trapped and handled by the emulator).


One thing I hadn't realised is that the graphics operations that BBC BASIC offers are actually implemented via the OSWRCH handler (OS WRite CHaracter), which means that BBC BASIC's PLOT, MOVE and DRAW commands will also be available, as well as any commands that use them indirectly (such as CIRCLE).
Sign in to follow this  


2 Comments


Recommended Comments

So could it be ported to Sega 8-bit hardware? Sega BASIC is rather rubbish compared to the godly BBC Basic. I spent many an hour messing around in there on my Z88.

Share this comment


Link to comment
Yes, it could be ported relatively simply. It only requires about 13KB of ROM for the interpreter and about 1KB for workspace RAM; assuming a 32KB ROM that leaves you with a lot of space to implement the device-specific host interface code (very little of which actually needs to be implemented to get BBC BASIC up and running).

Assuming the SC-3000 was the target machine you'd presumably also need a special cartridge with added RAM, as I don't think the 1KB of remaining system RAM would really be of much use. (Alternatively, the SF-7000's RAM could be used, as well as its disk drive for saving/loading files). I really have no idea how the SC-3000's memory system works, I'm afraid (I emulated it as a flat 64KB RAM, which seems to work) so I'm not sure whether the &FF80..&FFFF range is available for writing on that machine. If not, J.G.Harston, author of the Spectrum port, is very kindly amending his relocator program to also relocate the jump table.

As the SMS is the more popular machine, it might be more fun to port BBC BASIC to that machine; it wouldn't require a very complex circuit to attach an AT (or PS/2) keyboard to its controller port, and you could use battery-backed RAM on a Flash cartridge to store programs.

I must confess, I'd never heard of the Z88, but it looks like a great machine. My nostalgia for BBC BASIC originates from prep school, where I was first introduced to serious programming on the BBC Master 128 machines. [smile]

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!