This page is a wiki. Please login or create an account to begin editing.

Horizon - BBC Micro (Model B) Emulator

No votes yet
Year released:
[www].se [ftp].se [mirror].us [mirror].de
horizon-13.sit (477.48 KB)
MD5: bc5202c3f0c1799d5d0748fa2f89d412
For Mac OS X
[www].se [ftp].se [mirror].us [mirror].de
horizon-131.dmg (696.72 KB)
MD5: 3a20cff1d624f944f6b325aadcf34cd6
For Mac OS X
[www].se [ftp].se [mirror].us [mirror].de
horizon-132.dmg (574.37 KB)
MD5: d60760af118464fdd9b986a148ceb76e
For Mac OS X
[www].se [ftp].se [mirror].us [mirror].de
horizon-133.dmg (574.33 KB)
MD5: 7aff7e832599fc806c878b2c05e0e5b7
For Mac OS X
[www].se [ftp].se [mirror].us [mirror].de
horizon-134.dmg (623.40 KB)
MD5: 18b0da4a9bf370a6b4f139e8510b0d8c
For Mac OS X
[www].se [ftp].se [mirror].us [mirror].de
horizon-135.dmg (624.92 KB)
MD5: 1f3673e77db63768660586faa9b4aa66
For Mac OS X
[www].se [ftp].se [mirror].us [mirror].de
horizon-136.dmg (1.29 MB)
MD5: ab615c3bafe6155154f67042e84b460c
For Mac OS X
[www].se [ftp].se [mirror].us [mirror].de
horizon-137.dmg (1.19 MB)
MD5: 01f0508c53f1f2b64126e39f22b7eb4c
For Mac OS X
[www].se [ftp].se [mirror].us [mirror].de
horizon-139.dmg (993.98 KB)
MD5: 56efa9c5d493200c1a67e4f3e5b423df
For Mac OS X
Guides on emulating older applications

What is it?

Horizon emulates an unexpanded BBC Micro (Model B) with 32K of RAM and 32K of ROM.

IMPORTANT: Due to copyright laws, the MOS and BASIC ROMs cannot be distributed with this software.

Instead you must connect your BBC Micro to your Mac and transfer the required files across. Appendix A gives details about BBC to Mac file transfer.

Note that you must use MOS version 1.20 since Horizon 'intercepts' the ROM at certain fixed locations and therefore it will probably not work with other versions. To complicate matters further, there may be a number of 1.20 variants in existence. Check Appendix F to see if your version will work.

This is the Mac OS X version of Horizon. The original version, for Mac OS 9 and for Windows, may be downloaded from Horizon is copyrighted by Chris Lam, and the OS X port is developed with his kind permission.

Why the Beeb?

The BBC Micro was a computer built by a British company called Acorn Computers who now build the RISC-based Archimedes. It appeared in the early '80s and was backed by the British Broadcasting Company; hence the BBC tag. The BBC even produced a series of TV programmes to help beginners new to computing. Primarily designed for schools and home use, the BBC Micro was certainly one of the most versatile machines of its day, sporting a host of expansion ports and buses and equipped with an excellent, structured BASIC which even today is still being sold commercially. And, of course, it was the launching pad for one of the most endearing games of all time, Elite.

Getting Started

Assuming you have the MOS and BASIC ROM images on your Mac now, put them in the 'ROMs' folder and rename them OSROM and BASIC. The emulator will look for all ROM images in this folder; it will also expect all other BBC files to be in the 'Software' folder.

Now launch Horizon to give you the familiar display...

At this point you can type in BBC BASIC statements, for example

*FX 0 gives you the Operating System version and

PRINT TIME gives you the time in 100ths of a second since power up.

You can type in a simple program such as

10 FOR I = 1 TO 1000

followed by RUN to see how fast (or slowly) Horizon goes. This takes 9 seconds on a real Beeb in MODE 7. Or you can type


which loads and runs a simple BASIC program to plot random triangles in random colours.

Another BASIC program included is 'DIS' which has the following useful features

D - disassembler
M - memory dump
E - exit program
H - print (no printing possible with MacBeebEm!)
R - select ROM
W - list all ROMs inserted



and try out the precursor to DOOM and Marathon. Finally type


and play a rip-roaring moon lander game. Here's a sneak preview...

The keyboard

The keyboard is fully emulated at the 'hardware' level and so all the usual editing features also work. The 10 red F keys are serviced by the 10 digit keys on the numeric keypad to the right of the Mac keyboard as well as the F keys if your Mac keyboard has them. Mac's 'control' key serves as the BBC's 'Caps Lock'; 'alt/option' as the CRTL and 'CAPS LOCK' as SHIFT LOCK. The far right Enter key is the BBC's COPY key. Escape is ESCAPE.

To simulate the action of pressing the BREAK key, select 'Hit Break' under the 'Break' menu. For a hard reset, press CTRL (i.e. Mac's 'alt/option' key) whilst 'hitting Break' and don't let go until you see the '32K' text come up. If you press SHIFT, Horizon looks for a binary file !BOOT to run.

For the benefit of PowerBook users who don't have F keys, you can simulate F keys by pressing CTRL + keys. To get the @ key, press CTRL A. You can even press CTRL + SHIFT + to get the Teletext colour codes in BASIC.

IMPORTANT: Some games require the : key for UP movement with / for down. Horizon
substitutes the ' key with the : key, hence the option under the 'Keyboard' menu is
checked. If you need to type the ' symbol, uncheck this option.

See Appendix B for more details.


Emulation of the 6845 CRTC and video ULA permits all graphics MODEs 0 to 6 to work as expected. Flashing colours and PALETTE are also supported. Most MODE 7 features (including flashing colours and contiguous/separated graphics, double height characters) are present except for certain control codes (152, 158 and 159).

You may notice that if you change from MODE 7 to MODE 1, the screen grows ever so slightly. This is because MODE 7 has 25 lines of characters and at 10 scan lines per character, that's 250 scan lines. MODE 1 has 32 lines at 8 scan lines per character yielding a total of 256, i.e. 6 extra lines. Horizon will adjust the height of its window to show all the necessary graphics. So when you load up Revs or Sabre Wulf, don't be alarmed to see the screen shrink. Smaller screens means less time eaten up plotting the image and hence better overall speed, especially for larger window views.

File Handling

A simple but flexible cassette filing system is supported. All files (except ROM images) must have a header of 10 bytes which specify the load and execution addresses. This applies to BASIC programs as well. See Appendices A and C for more info. There is no *CAT facility.

Hence you can perform SAVE, LOAD and CHAIN in BASIC as well as *SAVE, *LOAD and *RUN. All unknown * commands will assume you are *RUNning a file except for the following


which are ignored and will not attempt to run a file called 'DISK' etc. Other disk commands (e.g. *TYPE) will return a 'File not found' error. These commands will need to be removed before the program(s) can run properly. Disk filing drives and directories are not supported and software using *DIR before accessing files may not work properly unless you manually modify the filenames accordingly. Saving a file called ":0.E.BIGGLES" will create a file called 0.E.BIGGLES in the 'Software' folder.

Horizon will generate headers during all *SAVEs. BASIC's SAVE uses *SAVE and will therefore create the headers.

File names are not limited to 7 characters as with the Acorn DNFS. Filenames are not case sensitive.

This simple filing system also has the extra advantage that PAGE remains at the default value of &E00. Some of your disk based software may expect PAGE to be &1900, as is the case with the Acorn DNFS.

During I/O you may come across 4 error messages. These are

File FILENAME not found - FILENAME file not found in 'Software' folder.
If a subdirectory (see below) is specified, it is
wrapped by two colons.

Bad file header - this file has no header.

File not loaded - this file attempted to start loading into the upper 32K of

File not saved - end address is less than start address.

If you find your BBC programs fail to do I/O as expected, they may be relying on OSBPUT/OSBGET which are not implemented on Horizon.

After a while your 'Software' folder will become cluttered with files. You can specify a subdirectory (not to be confused with *DIR directories) by typing, for example,


after which Horizon will look for and write files to the folder 'ELITE-DIR' (which must be inside the 'Software' folder of course). Hitting Break or powering up will preserve your subdirectory setting. Only by typing


will you cancel your subdirectory setting. This is useful for organising your 'Software' folder. Don't have filenames beginning with an equal sign, it'll get confusing!

Paged ROMs

Four 'sockets' are available, one of which is taken by BASIC. When Horizon boots up, as well as looking for OSROM and BASIC, it will attempt to read ROM1, ROM2 and ROM3. If these exist, Horizon will 'plug' them into her circuit board. You then need to select 'Paged ROMs' under the 'System' menu to activate them (a check indicates they're turned on). The BASIC ROM is always present.

Type *HELP to see if they were successfully fitted. They should behave like on an unexpanded Model B.

Remember that NO HEADER is required for a ROM image.

In fact, the file called BASIC need not be the BASIC ROM at all. It can be any ROM, e.g. Wordwise. If it's an invalid language ROM, the dreaded 'Language?' message appears. Sort out your ROMs and Reset (no need to quit the application).

The facility to turn on and off the paged ROMs may seem a rather peculiar thing to want to do but some games repeatedly page in ROMs. Since the paging in and out of ROMs is somewhat time consuming for Horizon, games like Repton and Night Shade slow down considerably. In fact, it's a good idea to leave the ROMs off (default) unless you need them.


On Horizon, sound is emulated at the 'hardware' level and gives an astonishingly faithful imitation of real Beeb sound effects for many games. All sorts of wierd noises and bizarre envelopes are possible, and games using speech sound perfectly authentic.

What can Horizon run?

Lots of things. Some of the more demanding software it can run include Sabre Wulf, Wizadore, Elite, Thrust, Frak!, Night Shade, Repton, Exile and so on. Horizon can also run Revs which is REALLY demanding. In fact it's so demanding the emulator cheats; it recognises Revs is being executed and 'fiddles' the video interrupts to give a steady screen albeit with some flicker.

Some programs will execute undocumented 6502 instructions. When this happens, an alert box warns you of this.

See Appendix D for a list of software which have been tested on Horizon. If your programs don't seem to work, go through the checklist in Appendix G.

How fast does it go?

Horizon should attain full speed on any macintosh with an AGP video card.

Software transfer from the BBC Micro to Mac

You will have gathered by now that unless you have a BBC Micro (Model B with MOS 1.20) and a disk drive, you probably won't find much use for this emulator. If you have one, here's how to transfer files from the BBC Micro to the Mac.

You will first need to make a cable with a 5 Pin C DIN plug at one end (for the BBC RS423 socket) and a 8 pin mini DIN plug at the other (for the Mac modem socket). A good source for these in the U.K. is Maplin Electronics, Essex (Tel: 0702 552911). The Maplin part numbers are:-

RK64U DIN Plug (5 Pin C)
JX06G Mini DIN Line Plug (8 Pin)
XR25C Four core screened cable (or similar)

The cost for these items should be around two pounds. Check out their latest catalogue.

QUICK AND DIRTY METHOD: In fact, you can get away with just making a crude connection with 3 pieces of insulated wire to start with. Make sure the wires are no longer than 2 or 3 feet to avoid interference. If you plan to transfer lots of stuff, make a proper cable as soon as you can.

Below is a diagram of the two sockets, looking INTO THE BACKS of the respective computers.

BBC Micro (RS 423) Mac 8 pin mini-modem

• RTS • Data In • 8 • 7 • 6

• GND • 5 • 4 • 3

• CTS • Data Out • 2 • 1

Connections required are GND to 4, CTS to 6 and Data Out to 5.


Now to create a BBC file of the MOS ROM onto your BBC disk drive, type

*SAVE OSROM C000 +4000

and to create a BBC file of the BASIC ROM, run this program...

10 FOR I%=0 TO &3FFF
20 ?(&2000 + I%) = ?(&8000 + I%)
30 NEXT I%
40 *SAVE BASIC 2000 +4000

This copies the BASIC into RAM and then saves it. Note that *SAVE BASIC 8000 +4000 on its own doesn't work; you end up saving the DFS ROM!


With the cable set up, you now need some kind of communication utility for the Mac such as Zterm, which is a shareware application and widely available. Set the baud rate to the same value for both the BBC Micro and the Mac; I recommend 4800 bits per second. To do this on the BBC Micro, type

*FX 8 6

followed by

*FX 3 1

which will send screen output to the RS 432 port. If you have Zterm (or whatever) set up okay, you should see the BBC screen output echoed in Zterm. I usually *DUMP files over to Zterm, so now just type *DUMP OSROM and watch the dump being echoed in the Zterm window.

When it's finished, remove all preceding lines of text before the *DUMP output before saving from Zterm. This is important otherwise the 'Decode' utility will not produce the correct binary version of the dump.

Empty the Zterm window and repeat with *DUMP BASIC.


Okay, put the 2 files in the 'DUMP_Files' folder. Run 'Decode' to convert these ASCII dumps to binary. The new files will be in the 'Raw_Files' folder under the same names. Move these two files in the 'ROMs' folder. All being well, Horizon should now boot up into BASIC.

All BBC files (except ROM images) need a 10 byte header which contain the load and execution addresses. On your Beeb, use *INFO to obtain this information for your disk files. The utility 'Append' adds these headers to the headerless files in 'Raw_Files' and writes the new, headered file to the 'Software' folder where Horizon can now load them (see section C for more on headers).

Keyboard Layout

All characters on the Apple keyboard are now where they're suppose to be. Exceptions and additions are as follows.

BBC key On Mac Keyboard 

@ . (on keypad) as well as SHIFT 2

# `

CTRL Alt/Option

SHIFT LOCK CAPS LOCK (no longer the apple/flower key)

COPY ENTER (on keypad)

F0 F10 or 0 (on keypad)
F1..F9 F keys or 1..9 (on keypad)

F1..F9 CTRL 1..9

BREAK No key, use menu option.

Why is the CTRL key not the Mac 'control' key and the CAPS LOCK key not the Mac 'caps lock' key? Well, many games use the CAPS LOCK and CTRL keys to move left and right, so it was important to keep this layout.

File headers

The storage of BBC files is made more troublesome by the need to store the load and execute addresses for each file somewhere. The 'directory' approach was finally rejected in favour of keeping the information in a small header at the start of each file. Use the 'Append' utility to add headers to raw BBC files. The header consists of 10 bytes in the following format.

Offset Byte Comment

0 255 Must always be 255
1 L-LO Load address
2 L-HI
3 E-LO Execute address
4 E-HI
5 * Checksum
6..9 0 Four spare bytes
10.. EOF data File data proper

The checksum * is computed as (L-LO + L-HI + E-LO + E-HI) & 255. If this check fails or if the first byte is not 255, MacBeebEm will refuse to load the file. The last 4 bytes are currently unused and may take any value.

You are reminded that LOAD and CHAIN in BASIC loads the program at the PAGE setting and disregards the header info, although the header must still be present. As a guide, set the load and execute addresses for BASIC programs to &E00 and &8023 respectively if you are unsure.

*LOAD will only load files up to the 32K boundary between RAM and ROM. If this boundary is breached before the EOF is encountered, the remaining part of the file is ignored.

Note that summoning the Info box on the Mac for a file will not necessarily reveal the true length of the data fork, since custom icons will add a resource fork and the size of the file will include this extra information.

What works on Horizon

The following firmware and software have been tested pretty successfully on Horizon.
This is only a short list of the large amount of software that does work.

Firmware - Acorn Monitor, AMPLE Nucleus, BASIC 2, ISO-Pascal, Toolkit and Wordwise Plus.

Software - Alien 8, Arcadians, Atic Atac, Aviator, Blagger, Castle Quest, Chuckie Egg, Citadel, Eddie Kidd, Elite, Exile, Frak!, Guardian, Jet Boat, Jet Pac, Knight Lore, Labyrinth, Magic Mushrooms, Meteors, Maze, Microcosm, Mister E, Monaco, Monsters, Night Shade, Planetoids, Repton, Revs 5 Track, Rocket Raid, Sabre Wulf, Scrabble, Snapper, Space Cadet, Spaceman Sid, Sphinx Adventure, Super Pool, System 15000, Tarzan, Thrust, Twin Kingdom Valley, Way of the Exploding Fist, White Knight II, Wizadore and Zalaga.

Known problems

At the time of this release the following defects are known:-

1) Loading problems within Acorn's ISO Pascal which uses OSFILE. Cause unknown.

2) Invalid opcodes as required by Zalaga and Exile have been included. No others are implemented. Games such as Manic Miner, Match Day and Repton 2 don't work at the moment. All other titles listed in Appendix D are '6502 clean' as far as I know.

3) The value in &FE60 seems to play a crucial role in the running of Planetoids and especially Snapper. It's been fudged to put a fairly random value there so that both games work okay but it's not an ideal solution.

4) Pressing the ShutDown key with the Horizon application active doesn't work (I haven't a clue why, maybe some Mac OS boffin can inform me). Not a big problem though, just quit Horizon first and then hit the ShutDown key.

MOS 1.20 compatibility

Horizon intercepts the code in the MOS ROM at two locations. These are at

&F27D - The OSFILE routine. This address is reached by calling address &FFDD which indirects through &212. Check to see that ?&212 is &7D and ?&213 is &F2.

&F1B1 - The OSFSC routine. This address is reached indirectly through &21E. Check to see that ?&21E is &B1 and ?&21F is &F1.

The ampersand '&' symbol denotes hexadecimal notation. If your MOS 1.20 doesn't pass the 2 tests above, let me know.

My Beeb software doesn't work!

Don't panic!

1) Check that your original BBC files have transferred over correctly to the Mac. A baud rate higher than 4800 didn't work for me. The utility Decode expects your *DUMP files to have no preceding lines before the actual dump.

2) Make sure you have made a careful note of the load and execute addresses of each file and that you have typed them in correctly when using the Append utility.

3) Your disk software may expect PAGE to be set to &1900.

4) Your programs may require the DNFS to be present. There's no point expecting the DNFS ROM to work as a paged ROM because the required hardware emulation hasn't been coded.

5) Remember that the filing system is only partially implemented. If your programs use OSBPUT or OSBGET then these won't work.

Horizon PPC 1.3 for mac os x 10.1 or later
Horizon PPC 1.3.1 for mac os x 10.2 or later
Horizon PPC 1.3.2 for mac os x 10.2 or later
Horizon PPC 1.3.3 for mac os x 10.2 or later
Horizon PPC 1.3.4 for mac os x 10.2 or later
Horizon PPC 1.3.5 for mac os x 10.2 or later
Horizon Universal 1.3.6 for mac os x 10.4 or later
Horizon Universal 1.3.7 for mac os x 10.4 or later
Horizon Universal 1.3.9 for mac os x 10.4 or later not in archive.

All Upload Horizon from Richard Bannister Archive for mac.

Architecture: PPC x86 (Intel:Mac)

PPC and Universal