BBC Model B Emulator Version 0.5. 19/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, or know a man who can.

All code written by me D.Devenport (DDevenp666@@aol.com) (c) 1997.
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 5th 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).
You will most probably find an up-to-date version of this program at :
'The BBC Lives!' - www.nvg.unit.no/bbc/bbc.html
If you use this program 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 or better PC!

Additionally, if you have EXMON.ROM and/or DOCTOR.ROM in the same directory
as the emulator, they will also be loaded. (I suppose you could load other
ROMs by simply naming them DOCTOR.ROM and EXMON.ROM - using a DFS ROM is NOT
RECOMMENDED - it will do very stange things).

This program is compiled for a 486 processor. It *may/should* run on a 386 - I
have not used BSWAP in my assembler routines.
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.
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 6 'illegal' opcodes in the BBC 6502 are emulated.
                     These were enough to get Zalaga+others running. Zalaga
                     uses 4 'illegal' op-codes.
    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.
    Serial ULA     - Cassette motor LED.
    Keyboard       - see below for keyboard mappings
                     most keyboard information was gleaned from disassembling
                     the OS ROM... It may be wrong.
                     LEDs Numlock=Casette Motor
                          Capslock=CAPS lock
                          Scrollock=SHIFT lock
                          

Known problems:
Screen registers are not totally 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 - other than colour flashes.
No filing system :(
   - you can directly '*LOAD' into memory using F11 though :)
   - Then just type CALL and the execution address...
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)
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 left ALT works for CTRL too! (remember to turn off CTRL+key combinations
in windows)
SCROLL LOCK - holding this down freezes the emulation, till released

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

Have fun!

Cheers
Dave.

GAMES I HAVE SUCCESSFULLY RAN 
-----------------------------   

All the Scott Adams adventures
ARCADE ACTION - all 4 games
ARCADIANS
ATIC ATAC
Blagger
BLITZKREIG
CHESS - acornsoft
CHESS - program power
CHUCKIE EGG
Cybertron
Dave Devil Dennis
Dr Who and the mines of terror!
Felix in the factory
Firebug
FRAK!
GALAFORCE
Ghouls
HOPPER
Hunchback
JCB digger
JETPAC
Killer Gorilla
KIX
LABYRINTH
Level 9 adventures (most of them)
Match Day
MAZE
MREE
Mr Wimpy
PALACE OF MAGIC
PENGO
Positron
Repton
SENTINEL
Space Adventure
Spy Hunter
STARSHIP COMMAND
Stock car racer
THRUST
TWIN KINGDOM VALLEY
Warlords
WIZADORE
ZALAGA

- All these do not need to do any loading/saving during their running.
Expect many more games to be working after I add an FS. When Tom Seddon
gets regular net access back, I might incorporate his FS - if he is still
willing for me to do so. According to Tom, he is currently re-writing his FS,
but "it should be dead easy to intergate it with any emulator".


THANKS TO :
Tom Seddon, his emulator convinced me it could be done - he also supplied
some information on the 6845.
Robert Schmidt for The BBC Lives!
Everyone who has sent me encouragement - you know who you are.
