XBEEB(1)

NAME
xbeeb - Acorn BBC Micro emulator with X interface

SYNOPSIS
xbeeb [-ahV?] [-o file] [ -p[number] file] [-w number] [-s number] [-m mode] [-d dir] [file]

DESCRIPTION
The xbeeb program is an X11 based emulator of the Acorn BBC (British Broadcasting Corporation) Micro. The BBC Micro was first produced in the early 1980s by Acorn Computers of Cambridge.

The BBC Micro was based on the 6502 processor with a 16k operating system ROM, upto 32k RAM and 15 paged 16k ROMs for utilities.

  Options
The options are as follows:

-?  Display usage information.

-a  Emulate the Model A only - if available.

-d dir
    Use dir as the directory for disk emulation.

-h  Display usage information.

-m mode
    Start in display mode mode.

-o file
    Load the file as the Operating System image, i.e. at address 0xc000.

    -p[number] file Load the ROM image specified by file into the paged ROM location specified by number. If number is not specified the image is loaded into ROM number 15.

-s number
    Set the DIP switches to number, where number can be specified in octal, decimal or hex. Only the 5 least significant bits of number are used by the emulator.

-V  Display the version information.

-w number
    Set the paged ROM slot specified by number as writable.

file
    Load the snapshot file as the start point of the emulator.

  Implementation
All of the instruction set of a standard 6502 CPU, Illegal or undocumented opcodes on the NMOS 6502 and changes for the CMOS R65C02 and R65C12 are implemented.

The 6522 VIA implementation is almost complete. The emulation of the system VIA is sufficient to provide clock interrupts and keyboard handling for the OS.

The CRTC, Serial ULA and display implementation is complete enough to provide a reasonable emulation of the display. X11 fonts for all the teletext characters are provided.

  Keyboard
The keyboard handling is pretty much there, but not quite perfect as the Beeb has a somewhat non-standard keyboard layout compared with most available today.

There are a number of keys on the BBC Micro that do not work in the same way as a standard PC keyboard. As the keycodes depend on your X setting experimentation is probably the best way to understanding the mapping. Some important keys should be as follows:

•   Pause is the BREAK key
•   Right Alt is the SHIFT LOCK key
•   F10 is the F0 key
•   End quits the emulator
•   Home creates a snapshot
•   Enter on the keypad changes the directory used for the emulated file system

  Snapshots
There is a snapshot format for saving the complete machine state.

  Disk Emulation
The emulated disk system requires a directory containing a set of files present on a given disk, exactly as they would appear on a BBC disk. In addition there is a file called "__CATALOG__" which contains the name, load and execution address, length and sector number for each file as it would be displayed by *INFO

The sectory number is unused in this emulation - it's there for the sake of completeness and maybe used in the future.

FILES
/usr/pkg/share/xbeeb/roms/OS1.2.rom
    the Operating System rom image
/usr/pkg/share/xbeeb/roms/BASIC2.rom
    the BBC Basic rom image
/usr/pkg/share/xbeeb/roms/xdfs0.70.rom
    the XDFS rom image required for disc emulation

SEE ALSO
The best site for information about BBC Micro is http://www.nvg.ntnu.no/bbc

AUTHORS
This program was written by James Fidell. This man page was put together by Nick Hudson (nick@nthcliff.demon.co.uk)

BUGS
The following are known bugs:

•   Serial IO, the ADC, Econet, the FRED and JIM memory-mapped IO pages, the Tube and User VIA are pretty much all ignored.

•   The mark/space ratio for flashing teletext is a guess. I haven't a clue what it really is.

•   The emulator possibly only works on pseudo-colour X displays. It is untested on any others.

•   The MODE 7 screen emulation flickers because it updates the whole screen when it changes, rather than just the changed bits. The reason it works this way is because of the handling of double height characters - the context of each line may change because of a change in the line above it.

•   The code for re-initialising the screen when a snapshot has been loaded is quite horrid and is probably the source of a number of bugs. It needs more thought and work.

•   There are numerous places where it is unknown how the emulator should handle a given situation. These are usually documented in the code, but will cause a fatal error if encountered.

•   The cursor isn't implemented for bitmapped modes.

•   Handling of mixed case in filenames is incomplete. If a filename is mixed case on the disk, its exact name must be used in any command for loading or running it.

•   Although you won't hear anything, the emulator still does all that's necessary from the programming point of view to make sounds even if you don't have sound support. This means that there will be delays in programs that play sounds before they continue. The emulator hasn't crashed, honest.

•   Handling of hardware-scrolled screens isn't perfect. In the efs-demo and xdfs-demo directories there's a program called B.DEMO that will usually demonstrate the problem.

•   Changing the Horizontal Sync. register in the CRTC isn't implemented but is required for some games.

•   The counter in Hopper is screwy. I did have this working at once stage, but I've broken it again.

•   The screen window overlaps the window with the LED status in sometimes.