


HORIZON 95 - MANUAL
===================

The Acorn BBC Micro Emulator for Windows 95/NT
----------------------------------------------



System requirements
-------------------

You need a speedy 486 PC system (preferably Pentium 100MHz+).

Horizon 95 also requires either Windows 95 with
Direct X installed or NT 4.0 which (I believe) has the
Direct X software. Horizon uses the DirectSound component
for its 4 channel sound support. Since Direct X cannot
be installed on Windows 3.1, Horizon cannot run under
Windows 3.1.

You can find Direct X at Microsoft's website or on many free 
CDs which come with magazines. Direct X version 3 or later 
is recommended as it's faster.

Horizon cannot run in DOS!



1. 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. And, of course, it was the launching 
pad for one of the most endearing games of all time, Elite.



2. What is Horizon 95?
---------------------

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. 


You must get the ROMs from some other source. See my website for
some possible links, etc.

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. 



3. Getting started
------------------

Inside the 'Horizon' folder should be the following items:-

    Item                  Comment

    HORIZON.EXE           Emulator program (maybe named differently) *
    
    SOUND.DAT             Sound data file (not included in demo)

    APPEND.EXE            File utility (see section 6) *

    BDSPLIT               Folder
       BDSPLIT.EXE        File utility (see section 6) *
    
    SOFTWARE              Folder
       TRIANGLE             Sample BASIC program
       DIS                  A useful BASIC program
       3DMAZE               Travel through a maze! (BASIC program)
       LUNAR                A great lunar lander game! (also BASIC)

    ROMS                  Folder (empty)

    RAWFILES              Folder (empty... for use with APPEND.EXE)

    MANUAL.TXT            This file
    
    REGISTER.TXT          Text file on how to register for the full
                          version

* These can only be run within the Windows 95 environment.



Assuming you have the MOS and BASIC ROM images on your PC 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.

Set your monitor to 256 (or higher) colours and launch Horizon.

All being well, you should see the familiar black screen and title.
Otherwise see the section on TROUBLESHOOTING at the end of this file.


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
20 PRINT I
30 NEXT 

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

CHAIN "TRIANGLE"

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 (not supported in Horizon)
 	R - 	select ROM
 	W - 	list all ROMs inserted

Type 

CHAIN "3DMAZE"

and try out my precursor to DOOM. Finally type

CHAIN "LUNAR"

and play a rip-roaring moon lander game.


Under the 'System' menu is the 'Power up...' option which
restarts the emulator. This is more severe than just a CRTL+BREAK
since the ROM images are re-read and re-configured. 



4. The keyboard
---------------

The keyboard is fully emulated at the 'hardware' level and so all
the usual editing features also work.  

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


    BBC key           On PC Keyboard
    -------           --------------
    
        "             should be at SHIFT 2, SHIFT ' and DEL

        &             SHIFT 7 and INSERT/HELP

        @             END

        #             SHIFT 3

      CARET           PAGE UP (also at SHIFT 6)
      TILDA           SHIFT PAGE UP

    UNDERLINE         HOME (also at SHIFT -)
                     SHIFT HOME

   CAPS LOCK          F1 (or Z if 'Use ZX' in 'Keys' menu is checked)
   CTRL               F2 (or X if 'Use ZX' in 'Keys' menu is checked)
   SHIFT LOCK         F3

      COPY            PAGE DOWN

      F0              0 (on keypad)
      F1..F9          1..9 (on keypad)

      BREAK           No key, use menu option.


If some of the keys don't work or give the the wrong character, see
the TROUBLESHOOTING section below.

The reason for the F1 and F2 keys is that many games require 
CAPS LOCK and CTRL for left/right movement. If you check the 'Use ZX'
option in the 'Keys' menu then you can use the ZX keys for CAPS LOCK 
and CTRL. Don't forget to uncheck this option if you want to type 
Z or X! Also note that the 'BREAK' key or 'powering up' will uncheck 
this option which is generally desirable.


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


To simulate the action of pressing the BREAK key, select 'Hit
Break' under the 'Break' menu. For a hard reset, press CTRL  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. 



5. Graphics
-----------

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.

For a larger window, see the 'Screen' menu. The 'Full' view only
fits a screen size larger than 640x480 but the 'Nearly full' view
is designed especially for 640x480-only monitors.



6. 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 the section on 'File Headers' below. 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

*DIR
*DISK
*D.
*DISC
*DRIVE
*DR.

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 0EBIGGLES in the 'Software' folder. The dots
are removed since they clash with DOS/Windows convention.

You may specify the dots when you load a program, e.g.

 *LOAD E.PROG
 
but Horizon will strip the dot(s) and so look for a file called
'EPROG'. Remember that Acorn DFS file names are 7 characters preceded
by an optional directory letter and so all names will 'fit' the DOS
filename convention of 8.3 characters as long as no drive numbers are
specified (e.g. as in the :0.E.BIGGLES example above).

Filenames are not case sensitive.

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

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 DFS.

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 also named.

Bad file header      - this file has no header.

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

File not saved       - end address is less than startaddress.


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,

*=ELITE-DIR

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! 

Remember that the DOS backslash \ looks like the 1/2 character in 
MODE 7 (Teletext).



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.EXE 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, Horizon
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.



Disk images
-----------

N.B. Note that if you have original BBC 5 1/4" disks, you have to find 
some method (by connecting the RS432 ports) to transfer the disk
data to your PC hard drive. BDSPLIT.EXE does not do this nor can it
read your BBC disks directly! It can only read data files from your 
PC hard drive which is in the standard Acorn DFS disk format.


You may come across some BBC disk images on the net. Horizon cannot
read these directly; instead all the files need to be individually
extracted. The BDSPLIT.EXE does exactly this. Just double click from
Windows 95 and the MS-DOS windows will appear. Follow the instructions
as shown. A report file is outputted (called .REP) which tells you 
which files were extracted successfully and associated details such 
as load and exec addresses, the start sector on the disk and the 
file length.

All disk files are extracted with the necessary header! Put the 
extracted files in the 'Software' folder and try running them!

BDSPLIT.EXE does *not* run in DOS. It also expects disk images to 
be no larger than 80 tracks (that's 80*10*256 bytes = 204800 bytes). 
Excess bytes are ignored.

Because *DIR is not supported in Horizon, some amendments regarding 
the filenames may need to be carried out before games (etc.) will 
load properly.



7. 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 select 'Power up...' (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.



8. Sound
--------

On the full 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 weird noises and bizarre envelopes
are possible. 

You can toggle sound on and off under the 'Extras' menu. Adjust
the volume using the Sound control slider.



9. 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 and Horizon powers up. A few
are included to allow Zalaga and Exile to run. 

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.



10. How fast does it go?
------------------------

Ideally you need a Pentium 100MHz. On faster machines, you may have
to increase the screen size or frame rate so that it doesn't run
ridiculously fast.

You can alter the rate at which the display is updated by
selecting the 'Frames' menu. The 'Fewer' option draws the screen
less frequently whilst 'More' will give more detailed animation
at a slight loss of overall speed. If you have a slow BASIC game,
then the 'Fewer' option may come in useful. 

You can see just how fast Horizon is running by checking the
'Show FPS' item under the 'Extras' menu. This gives the number of
times the Horizon screen is being redrawn per real second (frames
per second or fps) and the CPU efficiency where 100% is roughly
the same as a real Beeb. Screen size, frame rate and the
complexity of the sound and graphics all affect these statistics.



11 - My Beeb software doesn't work!
-----------------------------------

Don't panic! 

1)   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.EXE utility.

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

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

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

5)   Software extracted from a disk image using BDSPLIT.EXE may need
some modification to filenames (or the code itself) before they will
run properly.



===============
Troubleshooting
===============

Q: When I launch Horizon, it says it can't find file DSOUND.DLL
A: That file is part of Direct X and must be installed whether
   you want to hear sounds or not. Always install Direct X using
   its SETUP.EXE. Don't try installing it manually.

Q: Some keys don't work or give the wrong character.
A: Try choosing the English(British) language with the British
   layout (in Properties) in the Keyboard control panel.

   After changing the Keyboard control panel, quit and re-launch 
   Horizon.

   Some characters like " # and @ will always be at different keys 
   for technical reasons... sorry!

Q: Horizon seems sluggish.
A: A Pentium at 100 MHz is the recommended system if you plan to
   use Horizon a lot. A 256K second level cache card may improve
   speed. Always run Horizon on its own with no other apps open.

Q: It can't find the OS files.
A: Make sure they are correctly renamed as OSROM and BASIC. These
   files must be in the ROMS folder.

   These Acorn ROM files are *not* distributed with Horizon for
   copyright reasons.

Q: Horizon reports problems with sound initialization.
A: Be sure Direct X was installed properly. Otherwise, try another
   version. Many magazines distribute Direct X in their CDs but
   some are incomplete! If in doubt, download the latest version
   from Microsoft's website.

   Problems may occur if you tamper with the SOUND.DAT file. Don't.

Q: Horizon slows down a heck of a lot when I move the mouse.
A: Try turning 'pointer trail' off in the Mouse control panel.



----------------------------------------------------------------

Comments and suggestions (please say you are a PC user) to...

E-mail: chris@shenleyfields.demon.co.uk
WWW   : http://www.shenleyfields.demon.co.uk/

Horizon (c) 1994-7 by Chris Lam.

----------------------------------------------------------------

