********************************************************************************
         uBee512 - an emulator for the Premium Microbee 512K FDD model
                      Copyright (C) 2007  Stewart Kay

For contact details please see the 'Contact' section at the end of this file.
********************************************************************************

Distribution License
====================
The GPL in this distribution applies only to the uBee512 sources, the
binaries produced from it and the associated documentation.  The SDL and
makez80 packages carry their own respective licenses.  The GPL does not
apply to any other parts of the distribution unless clearly stated.  Other
files and utility programs that are not GPL may form part of this
distribution but these are not required to be able to use the uBee512
emulator.

uBee512 GPL
-----------
uBee512 - An emulator for the Premium Microbee 512K FDD model
Copyright (C) 2007  Stewart Kay

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

uBee512 Tools License
---------------------
Any software tools that may be supplied that are not third party are
"Freeware".  the software comes with absolutely no warranties and is to be
used at your own risk.  The code is provided "as-is".

Third party software
====================
- Multi-Z80 CPU emulator by Neil Bradley (neil@synthcom.com)

- Simple DirectMedia Layer library by Sam Lantinga et al.
  http://www.libsdl.org/

- rom1.bin - the boot ROM image from the 128K Microbee.  Not included.

- charrom.bin - the character ROM image from the Microbee.  Not included.

- boot.dsk - default floppy OS boot image.  Not included.

NOTE: Disk images and ROMS may be obtained from http://microbee.no-ip.com

Overview
========
Welcome to the uBee512 Microbee Premium disk model emulator. This project is
a fork of the nanowasp v0.22 project and was started on the 5th June 2007.

uBee512 is an emulator for the Premium 512K disk drive Microbee series. It
supports full Premium graphics, sound and key board emulation.  The DRAM
emulation is 512KB allowing other third party operating systems to be used.

The program is command line driven and provides various command line
options.  A GUI interface is likely to be introduced in the future. The
current development has concentrated on emulation before tackling graphical
user interfaces.

Now that there are several emulators around for the Microbee this should
benefit users as ideas can be shared around to improve all the emulators.

All the development work has been carried out without any real Microbee
hardware for direct comparisons.  I gave all my Microbees and documentation
away in about the year 1997 and this is one of the reasons I have developed
the uBee512 emulator.  I have developed a lot of software for the Microbee
that was never released (I hope to release some of this at a later date). 
Since having the uBee512 emulator up and running I have been able to run
some of my software that other emulators have not been able to do.

You can get the packages from here:
https://sourceforge.net/projects/ubee512/

There is currently no dedicated web site for this project.

Objective
---------
The main objective of the emulator is to run existing software that works on
a real Microbee.  This emulator's goal is not to emulate the underlying
Microbee ICs exactly (i.e. Z80PIO, SY6545 and WD2793) but instead
concentrate on trying to make existing software usable.

What this means is that if you write some code to run in the emulator it
might not work on a real Microbee.  An example is setting up the PIO port. 
On this emulator things like the Microbee PC speaker are assumed to be there
ready for use so even if the CP/M BIOS does not send the PIO configuration
setup data it will still work where it might not on the real Microbee.

This situation may change for each emulated module as the emulator develops
further but for now it is not the main objective.

Platforms
---------
The source should be able to be built and run under most platforms that
supports SDL.  The Fastest code execution should occur on machines that
support an 80386 CPU as it can use the emitted assembly language file
produced from makez80.  Other CPUs can make use of the emitted 'C' output of
makez80.  Currently the supported platforms that have been tested on i386
and x86_64 hardware include the following:

- win32           Athlon XP 1.8GHz (2200+) 512Mb DRAM and Windows 2000

- Linux           Athlon AMD64 dual core (3800+) 2Gb DRAM and Fedora core 6
                  using the 32 bit version.

- FreeBSD         Athlon AMD64 dual core (3800+) FreeBSD 6.2 using the 32
                  bit version.

Features
--------
The uBee512 emulator package currently provides the following features:

New for this release: 
* Tape in and Tape out from/to wave file options.
* Tape output sample frequency option.

Fixed:
* --version option on Windows caused program to crash, FreeBSD likely too,
  The Linux build did not have this problem.

Overall features:
* Full Premium (Alpha+) model graphics support. 32K PCG, 8K Screen, 8K
  Colour and 8K Attribute RAM.
* Premium (Alpha+) emulation of the hardware inverse and flashing video
  defined in attribute RAM.
* 512K DRAM emulation.
* Speaker sound emulation.
* Fully mapped keyboard, emulates all keys correctly and key repeating works
  at correct speed.
* All 6545 cursor modes supported.
* Screen is resized to suit the current 6545 registers.
* Various disk images supported and has read/write capability for drives A-D.
* Speed execution accuracy and regulation is excellent and very fast in
  turbo mode and even faster if specifying the XTAL frequency to a high
  value.
* Default speed of emulation is 3.375 MHz but the target frequency can also
  be specified as a command line option.
* CRTC for the VBLANK status is much improved, important for key repeat
  speed and many games.
* Optional colour and monochrome monitor types: colour, green, amber, white
  and black.
* Standard Microbee emulation option for backwards compatibility.  (i.e. No
  Premium graphics)
* Full screen mode.
* Emulator 'hacking' options.

Premium emulation
-----------------
Premium Microbees were released standard with 16K of PCG and 2K each of
screen, attribute and colour RAM but was able to be expanded to 32K PCG and
8K each for the other three.  As emulated RAM is cheap you get the full
amount.

Part of the Premium's new graphics was support for hardware flashing of
video and inverse video.  Both of these have been emulated.

Colour support is also part of the Premium series and this too is emulated
and is also available when running in standard model colour mode.  You have
a choice of monitor types to view the output on.

Sound emulation
---------------
Sound emulation works very well on the machines used for testing.  I have
not had a chance to test on Windows XP or Vista.  Your mileage may vary in
this area depending on your host hardware and operating system.

Be aware that running in turbo mode option with sound can cause the sound
buffer to become full quite quickly and sound will become very distorted
and broken up.

The sound quality is also very dependent on the system timer granularity.
See the 'Speed performance' section for more information.

Speed performance
----------------- 
Emulation speed is excellent when targeting 3.375 MHz, the speed is
consistent and smooth on all programs tested.  This is the default when
starting the emulator.

In turbo mode the speed is very fast especially under Windows 2000 (other
windows not tested yet) and a 1.8 GHz Athlon XP (2200+).  The sound is still
played at the normal rate.

The Turbo mode is great if you do not need Z80 CPU and sound to stay in sync
or need time delays to be accurate.  Great for editing and testing, etc.

On my development machine, an Athlon AMD64 dual core (3800+) and Fedora core
6 installed with the 32 bit version I was able to run 4 x uBee512 emulators
at the same time with audio and speed all appearing to work at 3.375 MHz,
More instances were possible but the audio showed signs of breaking up.  I
don't know what the performance is like under Windows for this many
instances.

Even faster speed is possible by specifying the XTAL frequency to be
emulated as a command line option.  On the hardware mentioned above, 200+ MHz
of Z80 speed was achieved. The frame rate is reduced at these speeds so the
screen does not refresh as quick but this is all dependent on you host
platform's capability.  Reducing the XTAL frequency down improves the frame
rate.

The speed accuracy (and the sound quality) depends on the granularity of the
system timer.  You need to have a 1mS resolution.  If your resolution is
10mS you can expect the speed to be about 30% slower and the sound will
break up.  This was the case when testing on an older FreeBSD platform.  I
have been informed that the timer can be changed to 1mS on FreeBSD but this
was not tried.  Later testing on a FreeBSD 6.2 system gave the expected
results as this has 1mS resolution by default.

Z80 Operating systems
---------------------
The following operating systems have been tested and are known to work:

* CIAB
* Microbee 128K
* PJB v1.2 and 512K v2.0a pre-release

Z80 Application software
------------------------
Too numerous to mention it all, but essentially all system support programs
and 3rd party software work except for disk formatting programs, and
applications that need hardware that is not currently supported like tape,
serial, parallel port, etc.

All machine code games I have tried have worked well.

For Microworld basic programs the list is very long,  there are some very
good graphics and sound affects programs to be had.

Applications for the Premium like 'Simply Write' appear to work well with
out any problems.  I have also tested other Premium graphics programs and
the results has been very good.

For some good samples of Premium software search through the retro archive
(look in the CAT files) for clare1.mwb clareX.mwb, etc, QUIX-2.COM.

A huge amount of software is available at http://microbee.no-ip.com in the
uploads section.

Binary distributions
====================
Windows (win32)
---------------
A binary distribution for Windows (win32) is available in ZIP file format.

Source distributions
====================
Building the uBee512 Emulator
-----------------------------
The information provided here is for a Linux build environment, the win32
port of the emulator is cross compiled from here:

You will need to have a GCC build environment set up for the native build
and if you want to cross compile you will also need mingw and install the
SDL libraries for mingw.

To compile for FreeBSD you need to be on a FreeBSD system.  You should check
the Makefile FreeBSD section to see if it is correct for your version.  The
current set up is for v6.2

On unices generally, it appears that you must at least a minimum KDE
installation for SDL to work.

The Makefile does the job but it lacks some dependencies and portability,  I
hope to improve on this later.  If you make any changes to any header files
do a 'make clean' before compiling.
 
Untar the source distribution into a normal user work area logged in as
a standard user.

$ tar -xzf ubee512-n.n.n.tar.gz    (n.n.n is the version number)
$ cd ubee512-n.n.n/src

$ make linux

If you want to cross compile the windows version:
$ make win

Now as root:
# make install

or if you use sudo (ubunto) you could use:
$ sudo make install

If you have compile problems:
Open up the Makefile in a text editor and check the requirements section. 
You will need to make sure the xCINC and xCLIB for each target is correct
for your system.

Installation
============
Windows:
1. Unzip the windows binary distribution to drive c:\
   Don't use any other location as the emulator expects to find things
   in that location.
2. Copy the required disk images to c:\ubee512\disks\
3. Copy the required ROM images (see ROM IMAGES below)
4. Optional is to place tape wave files in c:\ubee512\tapes\
5. You can create a desktop link to the emulator with some options if you
   don't want to run from a command line.
6. If running from a cmd prompt from any location you will need to add a
   path for the system to find ubee512.  The path is c:\ubee512

Unices:
1. Make sure you are logged in as a normal user.
2. Run the ubee512 emulator.  The first time this occurs some directories
   will be created in your home account.  It will then exit.
3. Copy the required disk images to /home/username/.ubee512/disks/
4. Copy the required ROM images (see ROM IMAGES below)
5. Optional is to place tape wave files in /home/username/.ubee512/tapes/

ROM IMAGES
----------
You need to have two ROM images.

'rom1.bin' is the boot ROM.  This must be a banked DRAM model boot ROM to
allow the 512K emulation to load a banked memory operating system.

'charrom.bin' is the character ROM.  It needs two font sizes so requires a
3.375 Mhz model Microbee 4K ROM image.

Disk images and ROMS may be obtained from http://microbee.no-ip.com

Copy the ROMs to the following locations:

Windows:
c:\ubee512\roms\

Linux:
/home/username/.ubee512/roms/

Using the uBee512 Emulator
==========================
KEYBOARD
--------
All keys are mapped to their respective locations,  this includes the arrow
keys that appeared on the Premium series.  Some keys do not appear on an IBM
keyboard and these have been remapped as follows:

LINEFEED: Numeric-ENTER
   BREAK: Numeric-PLUS
   RESET: PAGEDOWN

Other functionality:
 Exit the emulator: END
Full screen toggle: ALT+ENTER

NOTE !!!!! Be careful with END and PAGEDOWN keys,  there is no confirmation
at present for these keys so if you accidentally press these you can lose
unsaved data.

DISK IMAGE FILES
----------------
The emulator currently supports the following types of disk images:

WARNING !!!!!: Some of these formats have not been tested,  in particular
are the '.DS80' and '.DS82' images.  Please first test with a copy of your
image.  If reading is successful from all areas of the image then writing
should be fine.  The main issue of concern here is the disk image
specifications and not so much the actual read/write functions.

'.DSK'
CPCEMU Disk image format,  only simple disk types as used by the Microbee
and similar should be used as the full specification is not implemented.

Currently the Microbee Modular DS80 disk image is not supported.

'.IMG' or '.NW'
raw image files in nanowasp v0.22 format, 40T DS DD

'.DIP' 
Disk Image Plus format.  This is currently under development and is subject
to change and may not be used in the future.

The following raw image formats have been introduced to allow easy creation
of raw images of disks commonly used by the Microbee.  The names also help
to identify what disk can be used in which drive to suit the Microbee OS.

The sectors are in sequential order starting from 1 (or 1 and 21 for DS80) 
The format of the singled sided images is: S0-T0, S0-T1, S0-T2, ...
The format of the double sided images is: S0-T0, S1,T0, S0-T1, S1-T1 ...

'.DS40'
Microbee 40T DS DD raw image (SBC)

'.SS80'
Microbee 80T SS DD raw image (CIAB)

'.DS80'
Microbee 80T DS DD raw image (Modular)

'.DS82'
Microbee 80T DS DD raw image (Dreamdisk)

'.DS84'
Microbee 80T DS DD raw image (PJB)

All disks are recognised by their file name extension,  and is not case
sensitive. A mixture of any of these disk types are allowed for drives A-D.

A disk image containing an operating system is required for drive A.

Disk images and ROMS may be obtained from http://microbee.no-ip.com

The images used are specified using the '-a, -b, -c, -d' command line
options when invoking the emulator.

If no image is specified for drive 'A' then boot.dsk will be booted.

You must only specify the image type that the OS knows about for each drive.
If you want to use an image of a different size/format for a particular
drive then you must use that OS's set up program to change the drive set up.

TAPE PORT IN/OUT
----------------
Tape out to a wave file using the --tapeo option and tape input from a wave
file using the --tapei option have been provided.

A new directory name of 'tapes' is now created in the installation and is
the default location for tape wave files.

The wave file format currently being used is documented further on.  The
format (the default format) may change in the future, compatibility between
different Microbee emulators on the file format will make life easier for
all concerned.  uBee512 currently saves and loads one format type.  The only
flexibility on creating wave files is the ability to set the sample frequency
desired.  Loading of wave files has more flexibility in that the data
element size, channels, etc. can have values other than 8 bit data and mono.

The files produced by uBee512 should be very accurate as regards the timing
as this is directly controlled by the Z80 cycle counters.  It will not make
any difference what the speed of emulation is for the accuracy, but the tape
writes and reads are much faster if emulating at high speed rates.  So if
you a bunch of wave files containing programs that you want to load and save
to disk then high speed mode is the way to go.

Tape sample frequency
---------------------
The tape output sample frequency can be specified using the --tapesamp
option. Currently the default sample frequency is 22050 Hz but this may
change in the future.

Loading on a Microbee
---------------------
The intention is to have the wave files produced by uBee512 to be loadable
by a real Microbee with the blue tape plug (yellow on later models ?)
connected to your PC speaker output socket and the wave file played back. 
This has not been tested at this stage.

Wave files from cassette
------------------------
The intention is also that Kansas City Standard (KCS) cassette tapes can be
recorded to a wave file (by other software) and then loaded back into the
emulator.  This also has not been tested.  The software used must be able to
write the format being used by uBee512 or converted afterwards.

Limited testing
---------------
Testing so far has been limited to saving to wave files using uBee512 then
loading back into uBee512.  As I do not have a Microbee computer I am unable
to test compatibility for real hardware.  I would appreciate any one who
could do this testing and let me know the results.

Saving data to tape
-------------------
Data will be written to the wave file whenever the tape out port changes
state.  The wave file is closed and finalised when exiting the emulator.

An example of how to use the tape out feature:

A:>basic

First load a '.MWB' file from disk:
>load "myfile"

Save the file to the tape device at 300 baud:
>csave "file1"

Save the file to the tape device at 1200 baud:
>csavef "file2"

Any single wave file can hold as many tape saves as required. A 5 second
quiet period is placed in the wave file between each csave or csavef
command.

Loading data from tape
----------------------
To load data from tape requires that an extra step be taken.  After issuing
a cload command in basic you need to press the F1 key.  This is required
because the emulator has no idea when a PIO port B read is made what the
intention was as there are other input bits on this port too.

When there is no more data left to be pulled out of the wave file you will
need to press the F1 key again to reset the file to the beginning and allow
the data to be accessed.

The F1 key may be pressed at any time to reset the file to the beginning,
but don't press it during a cload operation.

An example of how to use the tape in feature:

A:>basic

Load a file from tape:
>cload

!!!!! PRESS THE F1 KEY NOW !!!!!

After a few seconds you should see something like:
file1  B *

>cload
file2  B *

You can also specify the file you want to load from the wave file:

Press the F1 key to reset the wave stream.

>cload "file2"
file1  B
file2  B *

Consult the BASIC manual for all the tape commands.

EMULATION HACKING
-----------------
The Microbee was very popular with hardware hackers,  so why not have some
emulator hacking capabilities ?  The options below can be used to experiment
with the inside workings of uBee512:

-f, --frate=fps
-t, --turbo
-x, --xtal=frequency 
--vblank=method
--sound=method

A useful combination that prevents multiple keys being produced in quick
succession when running in turbo mode is to use:

-t --vblank=1

This will only work if the keyboard scanning code in the application uses
the VBLANK status of the 6545.  If the key scanning code relies on software
delays then it will not make any difference.

This will also control the speed of any games that rely on the VBLANK
status and play these at the correct rate.

An explanation of how uBee512 controls Z80 speed execution is needed here
before progressing any further:

By default a frame rate of 30 FPS and a xtal frequency of 3375000 Hz is used
to determine how many cycles of Z80 code are executed in one block:

cycles = xtal / framerate

A real Microbee would execute these cycles in this amount of time:

time = cycles / xtal

After these cycles have executed some house keeping duties are carried out,
i.e. screen updates, key checks, etc.  The time taken to execute the cycles
and the house keeping duties is measured (timex), so we now know what time
it took and what time it should take (time).  We can now calculate the delay
that is required from these two values:

delay = time - timex

This delay is used to make the emulator run at the stated xtal rate.  Turbo
mode simply disables inserting this delay, this then results in the emulator
running as fast as possible.

As the speed is made higher a state will eventually be reached where timex
will be larger than time.  The delay value will go negative and will not be
used.  This state is where the emulator can no longer regulate the execution
speed and will result in the frame rate reducing, essentially it will behave
as if in turbo mode.

Much faster execution is possible by increasing the cycles value and running
in turbo mode.  you can do this by specifying the frame rate with the
--frate option.  By making the frame rate smaller you end up with a higher
cycle value.  The higher cycle value results in the emulator spending more
time executing Z80 code and less time doing house keeping duties.  If the
cycle value is too high it will result in slow updating of the display.

Now that is known how things work the options can be used to play with the
speed.

A value of 200 MHz causes the screen to update quite slowly so may at first
appear to be slow but it is actually executing code very quickly:

--xtal=200.0

Another approach if you want speed is to specify a frame rate value and drop
it into turbo mode, whenever turbo mode is used the frame rate no longer holds
true, it simply determines how many Z80 cycles are executed in one frame.

The example shown below will execute 3375000/10 Z80 cycles per frame with no
additional delays thrown in, the --vblank option is just used to stop keys
exploding out under basic or CP/M:

-t --frate=10 --vblank=1

COMMAND LINE OPTIONS
--------------------
Usage: ubee512 [options]

-a, --image_a=file      Image file path & filename for floppy drive A
-b, --image_b=file      Image file path & filename for floppy drive B
-c, --image_c=file      Image file path & filename for floppy drive C
-d, --image_d=file      Image file path & filename for floppy drive D

                        If you specify a path as part of the image name then
                        it will be accessed from that area.  If only an
                        image name is specified the emulator will look for
                        it here:

                        Windows:
                        c:\ubee512\disks\

                        Unices:
                        /home/username/.ubee512/disks/

                        Hint: if you want to access an image in the current
                        directory you need to force it using the following
                        method:

                        Windows:
                        ubee512 -a .\myimage.dsk

                        Unices:
                        ubee512 -a ./myimage.dsk

--frate=fps             Frame rate,  the default is 30 FPS,  an integer value
                        between 1 and 1,000,000 is allowed.  This option is
                        intended for 'hacking' and code development use.

-f, --fullscreen        Start in full screen mode (use ALT+ENTER to toggle).

-h, --help, --usage     Display help information on command line usage

-m, --monitor=type      Monitor type, if this option is not specified a
                        colour monitor is the default. <type> may be one
                        of the following:

                        a : amber monitor
                        g : green monitor
                        w : white monitor, white foreground on black
                            background
                        b : black monitor, black foreground on white
                            background
                        c : colour monitor

                        Note: This option by itself does not force the
                        emulation into a standard model Microbee, it's use
                        simply determines what sort of monitor is connected
                        to the emulated microbee, be it a standard or
                        Premium model.  If you want to force the Premium
                        graphics 'off' you must uses the -s<col> option.  If
                        <col> = m then this option can then further set
                        the desired monochrome colour.

--sound=method          Determine the method used for sound,  the default
                        method is 'prop':

                           off : sound is turned off
                          prop : sound is proportional to XTAL frequency
                        normal : sound rate forced as if 3.375 MHz XTAL

-s, --standard=col      Standard graphics Microbee emulation,  turn off
                        the Premium (alpha+) graphics and use a standard
                        green monitor. The <col> specifier allows for
                        standard monochrome or colour support:

                        c : standard Microbee with colour
                        m : standard Microbee with Green monochrome

                        If using this option with the 'm' parameter then the
                        -m<mode> option can also be specified to select the
                        monochrome colour that is preferred.

--tapei=file            Tape input from a WAV file.  The location of the file
                        follows the same rule as used for the drive image
                        options except default directory is 'tapes'.

--tapeo=file            Tape output to a WAV file.  The location of the file
                        follows the same rule as used for the drive image
                        options except default directory is 'tapes'.

--tapesamp=frequency    Tape output sample frequency in Hz.  Default is
                        22050 Hz.

-t, --turbo             Turbo mode, executes Z80 code as fast as possible.
                        Without this option the emulation attempts to keep
                        Z80 CPU execution to match the XTAL value.  This
                        option is intended for 'hacking' and code development
                        use.  There are much faster methods if more speed is
                        required. (see the README file)

--vblank=method         Vertical blanking method to be employed. This is
                        only intended for 'hacking' when experimenting with
                        turbo mode and/or high XTAL speeds.  It is not
                        required or even recommended to be used if 3.375 MHz
                        or 2 MHz emulation is desired.

                        0 : 50 Hz VBLANK rate derived from Z80 cycles and is
                            proportional to the XTAL frequency.
                        1 : 50 Hz VBLANK rate derived from the host timer.

                        When running in turbo mode then setting the <method>
                        equal to 1 will ensure that a VBLANK rate of 50Hz
                        will be used.  Without this, key repeating may be
                        too fast.

--version               Obtain the version number.

--vol=level             Set the sound volume level.  A level of 0 to 127 is
                        allowed. (default level is 16)

-x, --xtal=frequency    Set the XTAL frequency for emulation in MHz.
                        Standard emulation frequencies are 3.375 and 2.0
                        MHz.  All other frequencies are classed as 'hacking'.
                        3.375 MHz is the default XTAL frequency.  Frequency
                        is entered as a floating point number.

                        The highest frequency possible is determined by the
                        host platform.  As the value increases to the point
                        where uBee512 can no longer regulate the Z80
                        execution rate the frame rate will decrease (slower
                        screen update periods).

-z, --debug             Debugging output (for development purposes only)
                        writes to a log file.

Some sample command lines
-------------------------
Show the help information on command line usage.
>ubee512 -h

Boot the boot.dsk image found in the default location.
>ubee512

Boot the boot.dsk image found in the path specified. Use forward
slashes on unices.
>ubee512 -a \path\otherboot.dsk

Boot a 128K system with A and B images
>ubee512 -a myboot128k.dsk -b mydisk-ds40.dsk

For 'micro defender' game we must use a monochrome monitor.  The '-mw' is
for white on a black background.
>ubee512 -mw -a mybootdisk.dsk

Boot the default boot image in full screen mode.
>ubee512 -f

Boot the default boot image in turbo and full screen mode.
>ubee512 -t -f

Boot the default boot image with the sound off.
>ubee512 --sound=off

Boot the default boot image with the sound volume set to level 10.
>ubee512 --vol=10

Boot the default boot image with a XTAL frequency set to 2 MHz.
>ubee512 --xtal=2

Boot the default boot image, use a tape input wave file
>ubee512 --tapei=mytape.wav

Specifications
==============
WAVE FILE FORMAT
----------------
uBee512 uses The Canonical WAVE File Format.

Here are some links about it:
http://www.lightlink.com/tjweber/StripWav/Canon.html

I used this as my reference material:
http://ccrma.stanford.edu/courses/422/projects/WaveFormat/

Files created by uBee512 are:
- PCM: 1 (no compression)
- Channels: Mono (single channel)
- Sample rate: can be specified using --tapesamp option
- Bits per sample: 8

Files read by uBee512 must conform to:
- PCM: 1 (no compression)
- Channels: specification dependent (only the first channel data is used)
- Sample rate: specification dependent
- Bits per sample: 8, 16 or 32

Acknowledgements
================ 
1. Thanks to the nanowasp v0.22 release by David G. Churchill. This project
   was forked from it.

2. Thanks to the http://microbee.no-ip.com web site.  This site provided the
   various documentation I needed to make this project happen.

3. Thanks to Neil Bradley (Multi-Z80 CPU emulator) for allowing me to make
   some code changes to makez80.c to add an undocumented instruction.

4. Thanks to Malcolm Kay for his assistance and for building and testing the
   FreeBSD port.

Links
=====
- http://microbee.no-ip.com web site.  This site provides a lot of useful
  information for Microbee users.

Contact
=======
If you have any new feature suggestions, bug reports, etc. then please send
an email to: ubee512@gmail.com

For bug reports you need to state the version number of the uBee512 emulator
and the platform it was running on, for example if running on Windows then
state if W95, W98, Me, W2000, XP, Vista, etc.  Same for Linux, state the
actual Linux distribution used and version.  Also state the SDL version used
if known.

If you have access to some real Microbee hardware then please test against
that before filing any bug reports.

Replies to general help questions will depend on how much email I receive
and my available free time. I will see what I can do but hopefully a forum
can handle most of this where other users can help out and get involved.

Enjoy!

Stewart
(uBee on the http://microbee.no-ip.com site)
