BBC Model B Emulator Version 0.4. 10/7/97

DISCLAIMER:
I will not be held responsible for any damage caused by the use/misuse of
this software. Use it at your own risk. Please do not distribute it with ROMs.
Do not ask me for ROMs, or where to find them. I am sure you know how to
use a search engine.

All code written by me D.Devenport (DDevenp666@@aol.com).
Except TWKUSER.C/H which is public domain written by Robert Schmidt
of Ztiff Zox Softwear, 1992-93. (I know software is spelt wrong!)

The archive should contain the following (and only the following files):
    DOS4GW.EXE
    README.TXT
    CHANGES.TXT
    BBC.EXE
    M8 - this is the 'mode 8' program out of the AUG simply *Load it (F11)
         at e00 and then type RUN within the Emulator.


This program is the 4th alpha release of an attempt to emulate the total
hardware of a BBC Model B by Acorn Computers. This program is FREEWARE and
should not be sold without the consent of the author (which you won't get).
If you use it send me an email, and tell me what you think.
This program is written in C using Watcom 10.6. There are a couple of ASM
portions (Putting mode 7 characters into the VGA card, and putting the
Graphics mode screens into the VGA card).


Requirements:
First you need two files (Don't ask me for them)
OS.ROM    - this is an image of the OS 1.2 ROM
BASIC.ROM - this is an image of the BASIC2 ROM
A 486 PC!

This program is compiled for a 486 processor. It *may/should* run on a 386.
On my 486-100 it runs at approximately 110% BBC speed - this includes totally
redrawing the screen 25 times an 'emulated second'. At the moment the screen
code 'guesses' what mode you are in, and just stuffs Bytes to the VGA card by
'brute force'. The next release will take into account the 6845 registers
more. I have mostly rewritten the 6502 core emulation in ASM - but it hardly
seems worth it now...

The next release should be much faster (if I finish the ASM cpu), and include
sound and joystick support. It will also include a much needed SLOOOOOOW DOWN
feature to run at exact speed. Look out for it around the end of August. I
have also started to 'dabble' with an FS.


Hardware currently supported and emulated (I hope correctly):

    6502 processor - BCD is probably still dodgy (can anyone test this?)
                     Only 4 'illegal' opcodes in the BBC 6502 are emulated.
                     These were enough to get Zalaga running.
    6522 VIA's     - both System and User (Interrupts may not be held for
                     long enough)
    ROM Paging     
    ADC Controller - Although I haven't yet bothered transferring information
                     from the PC joystick port to the ADC registers.
    Sound          - All registers, although I have yet to pass this on to
                     the sound blaster/adlib ports (expect a sound release
                     soon)
    6845 CTRC      - Abnormal screen sizes not yet catered for. I am ignoring
                     the relevent registers at the moment.
    Video ULA      - All the standard modes + mode '8' catered for.
    Keyboard       - see below for keyboard mappings


Known problems:
Emulated interrupts may not be 'held' long enough.  This causes an annoying
pause in some games. It is either the keyboard or V-SYNC interrupt.
Screen registers are not fully taken into account during the copying of a
graphics mode screen memory to the VGA card. The next release will sort this
out, with virtually no slow down! Split screens are catered for, but are
excluded from the screen draw at this time. The same goes for colour changes
the occur during the screen draw.
No filing system :(
   - you can directly '*LOAD' into memory using F11 though :)
Aspect ratio not quite correct on MODE 7 (or other modes for that matter but
they aren't included in this release). If you manage to get a better aspected
240x250 x 256 colours mode let me know!
(Also my 640x264 x 16 colours mode doesn't yet fill the screen vertically -
again let me know, or if you can tweak a non-VESA 256 colour mode, I would
be grateful). Yes it does say 264 not 256...
No cursor displayed in graphics modes.
Double buffering not yet implemented. This will be added to the graphics modes,
but not MODE 7.
Emulation too slow?! - Mostly written the 6502 core in pure ASM. I will maybe
                       add this in the next release!!



Keyboard mappings (different from PC)
Beeb    PC

BREAK   f12
f0-f9   f1-f10 (f0 is f10)
up      up
down    down 
left    left
right   right
- =     - 
^ ~     = 
3 #     3 
6 &     6
7 '     7
8 (     8
9 )     9
0       0
DEL     BACKSPACE
COPY    KEYPAD 0
; +     ;
: *     ' (right quote)
@       ` (left quote)
 _     #
SLOCK   NUM LOCK

ALSO keypad 7 and 8 are CAPS/CTRL for zalaga left/right...

Also F11 allows *LOADing into memory and also quitting the program.

Have fun!

Cheers
Dave.

P.S. If there are any faults in this documentation, hard luck - most of it
was written after 4 hours spent in the pub
