diff --git a/Build.cmd b/Build.cmd
index 014edcf5..daca9a00 100644
--- a/Build.cmd
+++ b/Build.cmd
@@ -1,9 +1,6 @@
@echo off
-
setlocal
if not exist Output md Output
-cd Source
-
-call Build %*
+pushd Source && call Build %* && popd
diff --git a/BuildDoc.cmd b/BuildDoc.cmd
new file mode 100644
index 00000000..b2bfe67e
--- /dev/null
+++ b/BuildDoc.cmd
@@ -0,0 +1,4 @@
+@echo off
+setlocal
+
+pushd Doc && call Build && popd
diff --git a/Clean.cmd b/Clean.cmd
index 561798bb..c3d52c2a 100644
--- a/Clean.cmd
+++ b/Clean.cmd
@@ -3,6 +3,7 @@
setlocal
pushd Source && call Clean && popd
+pushd Doc && call Clean && popd
pushd Images && call Clean && popd
pushd Hardware && call Clean && popd
diff --git a/Doc/Build.cmd b/Doc/Build.cmd
new file mode 100644
index 00000000..bf7ef091
--- /dev/null
+++ b/Doc/Build.cmd
@@ -0,0 +1,4 @@
+@echo off
+setlocal
+
+pushd Source && call Build && popd
diff --git a/Doc/Clean.cmd b/Doc/Clean.cmd
new file mode 100644
index 00000000..bd4712a4
--- /dev/null
+++ b/Doc/Clean.cmd
@@ -0,0 +1,7 @@
+@echo off
+setlocal
+
+pushd Source && call Clean && popd
+
+if exist "RomWBW User Guide.pdf" del "RomWBW User Guide.pdf"
+if exist "RomWBW System Guide.pdf" del "RomWBW System Guide.pdf"
diff --git a/Doc/Reference/zcpr.pdf b/Doc/Reference/zcpr.pdf
new file mode 100644
index 00000000..9686ab07
Binary files /dev/null and b/Doc/Reference/zcpr.pdf differ
diff --git a/Doc/Source/Build.cmd b/Doc/Source/Build.cmd
new file mode 100644
index 00000000..efab1a64
--- /dev/null
+++ b/Doc/Source/Build.cmd
@@ -0,0 +1,9 @@
+@echo off
+setlocal
+
+pushd "RomWBW User Guide" && call Build && popd
+pushd "RomWBW System Guide" && call Build && popd
+
+if exist "RomWBW User Guide\Main.pdf" copy "RomWBW User Guide\Main.pdf" "..\RomWBW User Guide.pdf"
+if exist "RomWBW System Guide\Main.pdf" copy "RomWBW System Guide\Main.pdf" "..\RomWBW System Guide.pdf"
+
diff --git a/Doc/Source/Clean.cmd b/Doc/Source/Clean.cmd
new file mode 100644
index 00000000..9547adf7
--- /dev/null
+++ b/Doc/Source/Clean.cmd
@@ -0,0 +1,5 @@
+@echo off
+setlocal
+
+pushd RomWBW User Guide && call Clean.cmd && popd
+pushd RomWBW System Guide && call Clean.cmd && popd
\ No newline at end of file
diff --git a/Doc/Source/RomWBW System Guide.docx b/Doc/Source/RomWBW System Guide.docx
new file mode 100644
index 00000000..e15c772f
Binary files /dev/null and b/Doc/Source/RomWBW System Guide.docx differ
diff --git a/Doc/Source/RomWBW System Guide/Build.cmd b/Doc/Source/RomWBW System Guide/Build.cmd
new file mode 100644
index 00000000..7a5a42e1
--- /dev/null
+++ b/Doc/Source/RomWBW System Guide/Build.cmd
@@ -0,0 +1,4 @@
+@echo off
+setlocal
+
+call texify -p --clean Main.ltx
\ No newline at end of file
diff --git a/Doc/Source/RomWBW System Guide/Clean.cmd b/Doc/Source/RomWBW System Guide/Clean.cmd
new file mode 100644
index 00000000..b5128c0a
--- /dev/null
+++ b/Doc/Source/RomWBW System Guide/Clean.cmd
@@ -0,0 +1,7 @@
+@echo off
+if exist *.aux del *.aux
+if exist *.log del *.log
+if exist *.toc del *.toc
+if exist *.lot del *.lot
+if exist *.lof del *.lof
+if exist *.pdf del *.pdf
diff --git a/Doc/Source/RomWBW System Guide/Generate.cmd b/Doc/Source/RomWBW System Guide/Generate.cmd
new file mode 100644
index 00000000..f43109b8
--- /dev/null
+++ b/Doc/Source/RomWBW System Guide/Generate.cmd
@@ -0,0 +1,4 @@
+@echo off
+setlocal
+
+texify -p -V --run-viewer Main.ltx
diff --git a/Doc/Source/RomWBW System Guide/Logo.png b/Doc/Source/RomWBW System Guide/Logo.png
new file mode 100644
index 00000000..3d43ff31
Binary files /dev/null and b/Doc/Source/RomWBW System Guide/Logo.png differ
diff --git a/Doc/Source/RomWBW System Guide/Main.ltx b/Doc/Source/RomWBW System Guide/Main.ltx
new file mode 100644
index 00000000..b6cb5a9c
--- /dev/null
+++ b/Doc/Source/RomWBW System Guide/Main.ltx
@@ -0,0 +1,790 @@
+\documentclass[letterpaper,12pt]{refrep}
+\usepackage[T1]{fontenc} % Handle char values 128-255
+\usepackage[scaled]{helvet} % A nice sans serif font please
+\usepackage{blindtext} % Enable \blindtext
+\usepackage{scrextend} % ???
+\addtokomafont{labelinglabel}{\bfseries} % Make list labels bold
+\usepackage[inline]{enumitem} % Prettier version of enumerate list
+\usepackage{xcolor} % Enable colors?
+\usepackage{framed} % Enable framing (used in examples)
+\usepackage{graphicx} % ???
+\usepackage{fancyhdr} % More flexible header formatting
+\usepackage{xhfill} % Enable \xrfill used in footer
+%\usepackage{listings} % Handles source listings, improves on verbatim
+\usepackage{fancyvrb} % Enhances \verbatim to allow internal formatting
+\usepackage{hyperref} % More flexible hyperref formatting (\hypersetup)
+\usepackage{bookmark} % Avoids "Package rerunfilecheck Warning"
+\renewcommand*{\familydefault}{\sfdefault}
+\title{RomWBW System Guide\\Version 2.8}
+\author{Wayne Warthen\\wwarthen@gmail.com\\\\RetroBrew Computing Group\\http://www.retrobrewcomputers.org}
+\date{\today}
+\fullpage
+\sloppy
+\hypersetup{colorlinks=true}
+
+%\pdfobjcompresslevel=1
+
+\begin{document}
+
+\pagenumbering{roman}
+
+\pagestyle{empty}
+
+%\maketitle
+\begin{titlepage}
+ \centering
+ \par
+ \vspace*{72pt}
+ \includegraphics{Logo.png} \par
+ \vfill
+ \raggedleft
+ {\scshape \bfseries \fontsize{48pt}{56pt} \selectfont RomWBW \par}
+ {\bfseries \fontsize{32pt}{36pt} \selectfont System Guide \par}
+ \vspace{24pt}
+ {\huge Version 2.8 \\ \today \par}
+ \vspace{24pt}
+ {\large \itshape RetroBrew Computing Group \\ \href{http://www.retrobrewcomputers.org}{www.retrobrewcomputers.org} \par}
+ \vspace{12pt}
+ {\large \itshape Wayne Warthen \\ \href{mailto:wwarthen@gmail.com}{wwarthen@gmail.com} \par}
+\end{titlepage}
+
+%\newpage
+
+\setcounter{page}{2}
+
+\begin{center} \Large COPYRIGHT \end{center}
+
+Copyright \copyright{} 2016 Wayne Warthen
+
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.3
+or any later version published by the Free Software Foundation;
+with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
+A copy of the license is included in the section entitled "GNU
+Free Documentation License".
+
+\bigskip
+\begin{center} \Large DISCLAIMER \end{center}
+
+The author makes no representations or warranties with respect to the contents hereof and
+specifically disclaims any implied warranties of merchantability or fitness for any particular
+purpose. Further, the author reserves the right to revise this publication and to make
+changes from time to time in the content hereof without obligation of the author to notify
+any person of such revision or changes.
+
+\bigskip
+\begin{center} \Large TRADEMARKS \end{center}
+
+CP/M is a registered trademark of Digital Research. ASM, DESPOOL, DDT,
+LINK-80, MAC, MP/M, PL/1-80 and SID are trademarks of Digital Research. Intel is a
+registered trademark of Intel Corporation. Zilog and Z80 are registered trademarks of Zilog, Inc.
+
+\bigskip
+\bigskip
+\begin{center} \rule{3cm}{2pt} \end{center}
+
+\bigskip
+\bigskip
+\begin{it}
+This document was formatted using \LaTeX{} and produced using the MiKTeX implementation of pdfLaTeX, MakeIndex, and BibTeX running on Microsoft Windows.
+\end{it}
+
+%\clearpage
+
+\fancyhf{}
+\setlength{\headheight}{15.2pt}
+\pagestyle{fancyplain}
+\renewcommand{\chaptermark}[1]{ \markboth{#1}{} }
+\renewcommand{\sectionmark}[1]{ \markright{#1}{} }
+\lhead{ \fancyplain{}{\footnotesize \bfseries \rightmark \hfill RomWBW System Guide} }
+\lfoot{ \fancyplain{}{\small RetroBrew Computing Group ~~ {\xrfill[3pt]{1pt}[cyan]} ~~ \thepage} }
+
+\renewcommand{\contentsname}{Table of Contents}
+\tableofcontents
+\listoftables
+\listoffigures
+\clearpage
+
+\lhead{ \fancyplain{}{\footnotesize \bfseries \thesection ~ \rightmark \hfill RomWBW System Guide} }
+\pagenumbering{arabic}
+
+%\input{Overview.ltx}
+
+%\input{GettingStarted.ltx}
+
+\chapter{Introduction}
+
+\LaTeX{} is a document preparation system for
+the \TeX{} typesetting program. It offers excellent
+programmable desktop publishing features and
+extensive facilities for automating most
+aspects of typesetting and desktop publishing,
+including numbering and cross-referencing,
+tables and figures, page layout,
+bibliographies, and much more. \LaTeX{} was
+originally written in 1984 by Leslie Lamport
+and has become the dominant method for using
+\TeX; few people write in plain \TeX{} anymore.
+The current version is \LaTeXe.
+
+\section{Acknowledgements}
+
+\section{System Requirements}
+
+\section{Getting Started}
+
+\newpage
+
+This is a second paragraph.
+
+This is a third paragraph.
+
+An itemized list:
+
+\begin{itemize}
+\item First list item
+\item Second list item
+\item Third list item
+\end{itemize}
+
+
+An enumerated list:
+
+\begin{enumerate}[label=\textbf{\arabic*}.]
+\item First list item
+\item Second list item
+\item Third list item
+\end{enumerate}
+
+A description list:
+
+\begin{description}
+\item [Ant] What is an ant?
+\item [Elephant] \blindtext
+\end{description}
+
+Labeling:
+
+\begin{labeling}{alligator}
+\item [ant] really busy all the time
+\item [chimp] likes bananas
+\item [alligator] very dangerous animal, sharp teeth, long
+muscular tail and a bit of text that is longer than one
+line and shows the alignment of text quite nicely
+\end{labeling}
+
+\section{Getting Started}
+
+\begin{framed}
+\ttfamily
+\footnotesize
+%\small
+\begin{verbatim}
+C:>
+12345678901234567890123456789012345678901234567890123456789012345678901234567890
+12345678901234567890123456789012345678901234567890123456789012345678901234567890
+12345678901234567890123456789012345678901234567890123456789012345678901234567890
+12345678901234567890123456789012345678901234567890123456789012345678901234567890
+12345678901234567890123456789012345678901234567890123456789012345678901234567890
+12345678901234567890123456789012345678901234567890123456789012345678901234567890
+12345678901234567890123456789012345678901234567890123456789012345678901234567890
+12345678901234567890123456789012345678901234567890123456789012345678901234567890
+12345678901234567890123456789012345678901234567890123456789012345678901234567890
+\end{verbatim}
+\end{framed}
+
+Now something else.
+
+Below is a table:
+
+\begin{tabular}{l ||| l | l | p{5cm}}
+\hline
+hello & goodbyte & hex & decimal \\
+\hline
+\hline
+hello & goodbyte & hex & decimal \\
+hello & goodbyte & hex & decimal \\
+\hline
+\end{tabular}
+
+\chapter{Introduction}
+\section{Getting Started}
+\blindtext \par
+\blindtext \par
+\blindtext \par
+\blindtext \par
+\blindtext \par
+\blindtext \par
+
+\chapter{Introduction}
+\section{Getting Started}
+\blindtext
+
+\chapter{Introduction}
+\section{Getting Started}
+\blindtext
+
+\chapter{Introduction}
+\section{Getting Started}
+\blindtext
+
+\chapter{Introduction}
+\section{Getting Started}
+\blindtext
+
+\chapter{Introduction}
+\section{Getting Started}
+\blindtext
+
+\chapter{Introduction}
+\section{Getting Started}
+\blindtext
+
+\chapter{Introduction}
+\section{Getting Started}
+\blindtext
+
+\chapter{Introduction}
+\section{Getting Started}
+\blindtext
+
+\chapter{Introduction}
+\section{Getting Started}
+\blindtext
+
+\appendix
+
+\chapter{Licensing}
+
+\section{GNU Free Documentation License}
+
+%\chapter*{\rlap{GNU Free Documentation License}}
+%\addcontentsline{toc}{chapter}{GNU Free Documentation License}
+
+ \begin{center}
+
+ Version 1.3, 3 November 2008
+
+\end{center}
+
+Copyright \copyright{} 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
+\href{http://fsf.org/}{}
+
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+
+{\large\bf 0. PREAMBLE \par}
+
+The purpose of this License is to make a manual, textbook, or other
+functional and useful document ``free'' in the sense of freedom: to
+assure everyone the effective freedom to copy and redistribute it,
+with or without modifying it, either commercially or noncommercially.
+Secondarily, this License preserves for the author and publisher a way
+to get credit for their work, while not being considered responsible
+for modifications made by others.
+
+This License is a kind of ``copyleft'', which means that derivative
+works of the document must themselves be free in the same sense. It
+complements the GNU General Public License, which is a copyleft
+license designed for free software.
+
+We have designed this License in order to use it for manuals for free
+software, because free software needs free documentation: a free
+program should come with manuals providing the same freedoms that the
+software does. But this License is not limited to software manuals;
+it can be used for any textual work, regardless of subject matter or
+whether it is published as a printed book. We recommend this License
+principally for works whose purpose is instruction or reference.
+
+
+{\large\bf 1. APPLICABILITY AND DEFINITIONS\par}
+%\phantomsection
+%\addcontentsline{toc}{section}{1. APPLICABILITY AND DEFINITIONS}
+
+This License applies to any manual or other work, in any medium, that
+contains a notice placed by the copyright holder saying it can be
+distributed under the terms of this License. Such a notice grants a
+world-wide, royalty-free license, unlimited in duration, to use that
+work under the conditions stated herein. The ``\textbf{Document}'', below,
+refers to any such manual or work. Any member of the public is a
+licensee, and is addressed as ``\textbf{you}''. You accept the license if you
+copy, modify or distribute the work in a way requiring permission
+under copyright law.
+
+A ``\textbf{Modified Version}'' of the Document means any work containing the
+Document or a portion of it, either copied verbatim, or with
+modifications and/or translated into another language.
+
+A ``\textbf{Secondary Section}'' is a named appendix or a front-matter section of
+the Document that deals exclusively with the relationship of the
+publishers or authors of the Document to the Document's overall subject
+(or to related matters) and contains nothing that could fall directly
+within that overall subject. (Thus, if the Document is in part a
+textbook of mathematics, a Secondary Section may not explain any
+mathematics.) The relationship could be a matter of historical
+connection with the subject or with related matters, or of legal,
+commercial, philosophical, ethical or political position regarding
+them.
+
+The ``\textbf{Invariant Sections}'' are certain Secondary Sections whose titles
+are designated, as being those of Invariant Sections, in the notice
+that says that the Document is released under this License. If a
+section does not fit the above definition of Secondary then it is not
+allowed to be designated as Invariant. The Document may contain zero
+Invariant Sections. If the Document does not identify any Invariant
+Sections then there are none.
+
+The ``\textbf{Cover Texts}'' are certain short passages of text that are listed,
+as Front-Cover Texts or Back-Cover Texts, in the notice that says that
+the Document is released under this License. A Front-Cover Text may
+be at most 5 words, and a Back-Cover Text may be at most 25 words.
+
+A ``\textbf{Transparent}'' copy of the Document means a machine-readable copy,
+represented in a format whose specification is available to the
+general public, that is suitable for revising the document
+straightforwardly with generic text editors or (for images composed of
+pixels) generic paint programs or (for drawings) some widely available
+drawing editor, and that is suitable for input to text formatters or
+for automatic translation to a variety of formats suitable for input
+to text formatters. A copy made in an otherwise Transparent file
+format whose markup, or absence of markup, has been arranged to thwart
+or discourage subsequent modification by readers is not Transparent.
+An image format is not Transparent if used for any substantial amount
+of text. A copy that is not ``Transparent'' is called ``\textbf{Opaque}''.
+
+Examples of suitable formats for Transparent copies include plain
+ASCII without markup, Texinfo input format, LaTeX input format, SGML
+or XML using a publicly available DTD, and standard-conforming simple
+HTML, PostScript or PDF designed for human modification. Examples of
+transparent image formats include PNG, XCF and JPG. Opaque formats
+include proprietary formats that can be read and edited only by
+proprietary word processors, SGML or XML for which the DTD and/or
+processing tools are not generally available, and the
+machine-generated HTML, PostScript or PDF produced by some word
+processors for output purposes only.
+
+The ``\textbf{Title Page}'' means, for a printed book, the title page itself,
+plus such following pages as are needed to hold, legibly, the material
+this License requires to appear in the title page. For works in
+formats which do not have any title page as such, ``Title Page'' means
+the text near the most prominent appearance of the work's title,
+preceding the beginning of the body of the text.
+
+The ``\textbf{publisher}'' means any person or entity that distributes
+copies of the Document to the public.
+
+A section ``\textbf{Entitled XYZ}'' means a named subunit of the Document whose
+title either is precisely XYZ or contains XYZ in parentheses following
+text that translates XYZ in another language. (Here XYZ stands for a
+specific section name mentioned below, such as ``\textbf{Acknowledgements}'',
+``\textbf{Dedications}'', ``\textbf{Endorsements}'', or ``\textbf{History}''.)
+To ``\textbf{Preserve the Title}''
+of such a section when you modify the Document means that it remains a
+section ``Entitled XYZ'' according to this definition.
+
+The Document may include Warranty Disclaimers next to the notice which
+states that this License applies to the Document. These Warranty
+Disclaimers are considered to be included by reference in this
+License, but only as regards disclaiming warranties: any other
+implication that these Warranty Disclaimers may have is void and has
+no effect on the meaning of this License.
+
+
+{\large\bf 2. VERBATIM COPYING\par}
+%\phantomsection
+%\addcontentsline{toc}{section}{2. VERBATIM COPYING}
+
+You may copy and distribute the Document in any medium, either
+commercially or noncommercially, provided that this License, the
+copyright notices, and the license notice saying this License applies
+to the Document are reproduced in all copies, and that you add no other
+conditions whatsoever to those of this License. You may not use
+technical measures to obstruct or control the reading or further
+copying of the copies you make or distribute. However, you may accept
+compensation in exchange for copies. If you distribute a large enough
+number of copies you must also follow the conditions in section~3.
+
+You may also lend copies, under the same conditions stated above, and
+you may publicly display copies.
+
+
+{\large\bf 3. COPYING IN QUANTITY\par}
+%\phantomsection
+%\addcontentsline{toc}{section}{3. COPYING IN QUANTITY}
+
+
+If you publish printed copies (or copies in media that commonly have
+printed covers) of the Document, numbering more than 100, and the
+Document's license notice requires Cover Texts, you must enclose the
+copies in covers that carry, clearly and legibly, all these Cover
+Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
+the back cover. Both covers must also clearly and legibly identify
+you as the publisher of these copies. The front cover must present
+the full title with all words of the title equally prominent and
+visible. You may add other material on the covers in addition.
+Copying with changes limited to the covers, as long as they preserve
+the title of the Document and satisfy these conditions, can be treated
+as verbatim copying in other respects.
+
+If the required texts for either cover are too voluminous to fit
+legibly, you should put the first ones listed (as many as fit
+reasonably) on the actual cover, and continue the rest onto adjacent
+pages.
+
+If you publish or distribute Opaque copies of the Document numbering
+more than 100, you must either include a machine-readable Transparent
+copy along with each Opaque copy, or state in or with each Opaque copy
+a computer-network location from which the general network-using
+public has access to download using public-standard network protocols
+a complete Transparent copy of the Document, free of added material.
+If you use the latter option, you must take reasonably prudent steps,
+when you begin distribution of Opaque copies in quantity, to ensure
+that this Transparent copy will remain thus accessible at the stated
+location until at least one year after the last time you distribute an
+Opaque copy (directly or through your agents or retailers) of that
+edition to the public.
+
+It is requested, but not required, that you contact the authors of the
+Document well before redistributing any large number of copies, to give
+them a chance to provide you with an updated version of the Document.
+
+
+{\large\bf 4. MODIFICATIONS\par}
+%\phantomsection
+%\addcontentsline{toc}{section}{4. MODIFICATIONS}
+
+You may copy and distribute a Modified Version of the Document under
+the conditions of sections 2 and 3 above, provided that you release
+the Modified Version under precisely this License, with the Modified
+Version filling the role of the Document, thus licensing distribution
+and modification of the Modified Version to whoever possesses a copy
+of it. In addition, you must do these things in the Modified Version:
+
+\begin{itemize}
+\item[A.]
+ Use in the Title Page (and on the covers, if any) a title distinct
+ from that of the Document, and from those of previous versions
+ (which should, if there were any, be listed in the History section
+ of the Document). You may use the same title as a previous version
+ if the original publisher of that version gives permission.
+
+\item[B.]
+ List on the Title Page, as authors, one or more persons or entities
+ responsible for authorship of the modifications in the Modified
+ Version, together with at least five of the principal authors of the
+ Document (all of its principal authors, if it has fewer than five),
+ unless they release you from this requirement.
+
+\item[C.]
+ State on the Title page the name of the publisher of the
+ Modified Version, as the publisher.
+
+\item[D.]
+ Preserve all the copyright notices of the Document.
+
+\item[E.]
+ Add an appropriate copyright notice for your modifications
+ adjacent to the other copyright notices.
+
+\item[F.]
+ Include, immediately after the copyright notices, a license notice
+ giving the public permission to use the Modified Version under the
+ terms of this License, in the form shown in the Addendum below.
+
+\item[G.]
+ Preserve in that license notice the full lists of Invariant Sections
+ and required Cover Texts given in the Document's license notice.
+
+\item[H.]
+ Include an unaltered copy of this License.
+
+\item[I.]
+ Preserve the section Entitled ``History'', Preserve its Title, and add
+ to it an item stating at least the title, year, new authors, and
+ publisher of the Modified Version as given on the Title Page. If
+ there is no section Entitled ``History'' in the Document, create one
+ stating the title, year, authors, and publisher of the Document as
+ given on its Title Page, then add an item describing the Modified
+ Version as stated in the previous sentence.
+
+\item[J.]
+ Preserve the network location, if any, given in the Document for
+ public access to a Transparent copy of the Document, and likewise
+ the network locations given in the Document for previous versions
+ it was based on. These may be placed in the ``History'' section.
+ You may omit a network location for a work that was published at
+ least four years before the Document itself, or if the original
+ publisher of the version it refers to gives permission.
+
+\item[K.]
+ For any section Entitled ``Acknowledgements'' or ``Dedications'',
+ Preserve the Title of the section, and preserve in the section all
+ the substance and tone of each of the contributor acknowledgements
+ and/or dedications given therein.
+
+\item[L.]
+ Preserve all the Invariant Sections of the Document,
+ unaltered in their text and in their titles. Section numbers
+ or the equivalent are not considered part of the section titles.
+
+\item[M.]
+ Delete any section Entitled ``Endorsements''. Such a section
+ may not be included in the Modified Version.
+
+\item[N.]
+ Do not retitle any existing section to be Entitled ``Endorsements''
+ or to conflict in title with any Invariant Section.
+
+\item[O.]
+ Preserve any Warranty Disclaimers.
+\end{itemize}
+
+If the Modified Version includes new front-matter sections or
+appendices that qualify as Secondary Sections and contain no material
+copied from the Document, you may at your option designate some or all
+of these sections as invariant. To do this, add their titles to the
+list of Invariant Sections in the Modified Version's license notice.
+These titles must be distinct from any other section titles.
+
+You may add a section Entitled ``Endorsements'', provided it contains
+nothing but endorsements of your Modified Version by various
+parties---for example, statements of peer review or that the text has
+been approved by an organization as the authoritative definition of a
+standard.
+
+You may add a passage of up to five words as a Front-Cover Text, and a
+passage of up to 25 words as a Back-Cover Text, to the end of the list
+of Cover Texts in the Modified Version. Only one passage of
+Front-Cover Text and one of Back-Cover Text may be added by (or
+through arrangements made by) any one entity. If the Document already
+includes a cover text for the same cover, previously added by you or
+by arrangement made by the same entity you are acting on behalf of,
+you may not add another; but you may replace the old one, on explicit
+permission from the previous publisher that added the old one.
+
+The author(s) and publisher(s) of the Document do not by this License
+give permission to use their names for publicity for or to assert or
+imply endorsement of any Modified Version.
+
+
+{\large\bf 5. COMBINING DOCUMENTS\par}
+%\phantomsection
+%\addcontentsline{toc}{section}{5. COMBINING DOCUMENTS}
+
+
+You may combine the Document with other documents released under this
+License, under the terms defined in section~4 above for modified
+versions, provided that you include in the combination all of the
+Invariant Sections of all of the original documents, unmodified, and
+list them all as Invariant Sections of your combined work in its
+license notice, and that you preserve all their Warranty Disclaimers.
+
+The combined work need only contain one copy of this License, and
+multiple identical Invariant Sections may be replaced with a single
+copy. If there are multiple Invariant Sections with the same name but
+different contents, make the title of each such section unique by
+adding at the end of it, in parentheses, the name of the original
+author or publisher of that section if known, or else a unique number.
+Make the same adjustment to the section titles in the list of
+Invariant Sections in the license notice of the combined work.
+
+In the combination, you must combine any sections Entitled ``History''
+in the various original documents, forming one section Entitled
+``History''; likewise combine any sections Entitled ``Acknowledgements'',
+and any sections Entitled ``Dedications''. You must delete all sections
+Entitled ``Endorsements''.
+
+{\large\bf 6. COLLECTIONS OF DOCUMENTS\par}
+%\phantomsection
+%\addcontentsline{toc}{section}{6. COLLECTIONS OF DOCUMENTS}
+
+You may make a collection consisting of the Document and other documents
+released under this License, and replace the individual copies of this
+License in the various documents with a single copy that is included in
+the collection, provided that you follow the rules of this License for
+verbatim copying of each of the documents in all other respects.
+
+You may extract a single document from such a collection, and distribute
+it individually under this License, provided you insert a copy of this
+License into the extracted document, and follow this License in all
+other respects regarding verbatim copying of that document.
+
+
+{\large\bf 7. AGGREGATION WITH INDEPENDENT WORKS\par}
+%\phantomsection
+%\addcontentsline{toc}{section}{7. AGGREGATION WITH INDEPENDENT WORKS}
+
+
+A compilation of the Document or its derivatives with other separate
+and independent documents or works, in or on a volume of a storage or
+distribution medium, is called an ``aggregate'' if the copyright
+resulting from the compilation is not used to limit the legal rights
+of the compilation's users beyond what the individual works permit.
+When the Document is included in an aggregate, this License does not
+apply to the other works in the aggregate which are not themselves
+derivative works of the Document.
+
+If the Cover Text requirement of section~3 is applicable to these
+copies of the Document, then if the Document is less than one half of
+the entire aggregate, the Document's Cover Texts may be placed on
+covers that bracket the Document within the aggregate, or the
+electronic equivalent of covers if the Document is in electronic form.
+Otherwise they must appear on printed covers that bracket the whole
+aggregate.
+
+
+{\large\bf 8. TRANSLATION\par}
+%\phantomsection
+%\addcontentsline{toc}{section}{8. TRANSLATION}
+
+
+Translation is considered a kind of modification, so you may
+distribute translations of the Document under the terms of section~4.
+Replacing Invariant Sections with translations requires special
+permission from their copyright holders, but you may include
+translations of some or all Invariant Sections in addition to the
+original versions of these Invariant Sections. You may include a
+translation of this License, and all the license notices in the
+Document, and any Warranty Disclaimers, provided that you also include
+the original English version of this License and the original versions
+of those notices and disclaimers. In case of a disagreement between
+the translation and the original version of this License or a notice
+or disclaimer, the original version will prevail.
+
+If a section in the Document is Entitled ``Acknowledgements'',
+``Dedications'', or ``History'', the requirement (section~4) to Preserve
+its Title (section~1) will typically require changing the actual
+title.
+
+
+{\large\bf 9. TERMINATION\par}
+%\phantomsection
+%\addcontentsline{toc}{section}{9. TERMINATION}
+
+
+You may not copy, modify, sublicense, or distribute the Document
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense, or distribute it is void, and
+will automatically terminate your rights under this License.
+
+However, if you cease all violation of this License, then your license
+from a particular copyright holder is reinstated (a) provisionally,
+unless and until the copyright holder explicitly and finally
+terminates your license, and (b) permanently, if the copyright holder
+fails to notify you of the violation by some reasonable means prior to
+60 days after the cessation.
+
+Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, receipt of a copy of some or all of the same material does
+not give you any rights to use it.
+
+
+{\large\bf 10. FUTURE REVISIONS OF THIS LICENSE\par}
+%\phantomsection
+%\addcontentsline{toc}{section}{10. FUTURE REVISIONS OF THIS LICENSE}
+
+
+The Free Software Foundation may publish new, revised versions
+of the GNU Free Documentation License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns. See
+\texttt{http://www.gnu.org/copyleft/}.
+
+Each version of the License is given a distinguishing version number.
+If the Document specifies that a particular numbered version of this
+License ``or any later version'' applies to it, you have the option of
+following the terms and conditions either of that specified version or
+of any later version that has been published (not as a draft) by the
+Free Software Foundation. If the Document does not specify a version
+number of this License, you may choose any version ever published (not
+as a draft) by the Free Software Foundation. If the Document
+specifies that a proxy can decide which future versions of this
+License can be used, that proxy's public statement of acceptance of a
+version permanently authorizes you to choose that version for the
+Document.
+
+
+{\large\bf 11. RELICENSING\par}
+%\phantomsection
+%\addcontentsline{toc}{section}{11. RELICENSING}
+
+
+``Massive Multiauthor Collaboration Site'' (or ``MMC Site'') means any
+World Wide Web server that publishes copyrightable works and also
+provides prominent facilities for anybody to edit those works. A
+public wiki that anybody can edit is an example of such a server. A
+``Massive Multiauthor Collaboration'' (or ``MMC'') contained in the
+site means any set of copyrightable works thus published on the MMC
+site.
+
+``CC-BY-SA'' means the Creative Commons Attribution-Share Alike 3.0
+license published by Creative Commons Corporation, a not-for-profit
+corporation with a principal place of business in San Francisco,
+California, as well as future copyleft versions of that license
+published by that same organization.
+
+``Incorporate'' means to publish or republish a Document, in whole or
+in part, as part of another Document.
+
+An MMC is ``eligible for relicensing'' if it is licensed under this
+License, and if all works that were first published under this License
+somewhere other than this MMC, and subsequently incorporated in whole
+or in part into the MMC, (1) had no cover texts or invariant sections,
+and (2) were thus incorporated prior to November 1, 2008.
+
+The operator of an MMC Site may republish an MMC contained in the site
+under CC-BY-SA on the same site at any time before August 1, 2009,
+provided the MMC is eligible for relicensing.
+
+
+{\large\bf ADDENDUM: How to use this License for your documents\par}
+%\phantomsection
+%\addcontentsline{toc}{section}{ADDENDUM: How to use this License for your documents}
+
+To use this License in a document you have written, include a copy of
+the License in the document and put the following copyright and
+license notices just after the title page:
+
+\bigskip
+\begin{quote}
+ Copyright \copyright{} YEAR YOUR NAME.
+
+ Permission is granted to copy, distribute and/or modify this document
+ under the terms of the GNU Free Documentation License, Version 1.3
+ or any later version published by the Free Software Foundation;
+ with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
+ A copy of the license is included in the section entitled ``GNU
+ Free Documentation License''.
+\end{quote}
+\bigskip
+
+If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
+replace the ``with \dots\ Texts.''\ line with this:
+
+\bigskip
+\begin{quote}
+ with the Invariant Sections being LIST THEIR TITLES, with the
+ Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
+\end{quote}
+\bigskip
+
+If you have Invariant Sections without Cover Texts, or some other
+combination of the three, merge those two alternatives to suit the
+situation.
+
+If your document contains nontrivial examples of program code, we
+recommend releasing these examples in parallel under your choice of
+free software license, such as the GNU General Public License,
+to permit their use in free software.
+
+\end{document}
\ No newline at end of file
diff --git a/Doc/Source/RomWBW User Guide Old.docx b/Doc/Source/RomWBW User Guide Old.docx
new file mode 100644
index 00000000..4b71a3a4
Binary files /dev/null and b/Doc/Source/RomWBW User Guide Old.docx differ
diff --git a/Doc/Source/RomWBW User Guide.docx b/Doc/Source/RomWBW User Guide.docx
new file mode 100644
index 00000000..c3037256
Binary files /dev/null and b/Doc/Source/RomWBW User Guide.docx differ
diff --git a/Doc/Source/RomWBW User Guide/BoardNotes.ltx b/Doc/Source/RomWBW User Guide/BoardNotes.ltx
new file mode 100644
index 00000000..6c6beaa1
--- /dev/null
+++ b/Doc/Source/RomWBW User Guide/BoardNotes.ltx
@@ -0,0 +1,20 @@
+\chapter{Board Notes}
+
+\blindtext
+
+\section{SBC}
+
+\blindtext
+
+\section{Zeta}
+
+\blindtext
+
+\section{N8}
+
+\blindtext
+
+\section{Mark IV}
+
+\blindtext
+
diff --git a/Doc/Source/RomWBW User Guide/Build.cmd b/Doc/Source/RomWBW User Guide/Build.cmd
new file mode 100644
index 00000000..7a5a42e1
--- /dev/null
+++ b/Doc/Source/RomWBW User Guide/Build.cmd
@@ -0,0 +1,4 @@
+@echo off
+setlocal
+
+call texify -p --clean Main.ltx
\ No newline at end of file
diff --git a/Doc/Source/RomWBW User Guide/Clean.cmd b/Doc/Source/RomWBW User Guide/Clean.cmd
new file mode 100644
index 00000000..b5128c0a
--- /dev/null
+++ b/Doc/Source/RomWBW User Guide/Clean.cmd
@@ -0,0 +1,7 @@
+@echo off
+if exist *.aux del *.aux
+if exist *.log del *.log
+if exist *.toc del *.toc
+if exist *.lot del *.lot
+if exist *.lof del *.lof
+if exist *.pdf del *.pdf
diff --git a/Doc/Source/RomWBW User Guide/Customization.ltx b/Doc/Source/RomWBW User Guide/Customization.ltx
new file mode 100644
index 00000000..a544dadf
--- /dev/null
+++ b/Doc/Source/RomWBW User Guide/Customization.ltx
@@ -0,0 +1,12 @@
+\chapter{Customization}
+
+\blindtext
+
+\section{Build Process}
+
+\blindtext
+
+\section{Configuration File}
+
+\blindtext
+
diff --git a/Doc/Source/RomWBW User Guide/DiskUsage.ltx b/Doc/Source/RomWBW User Guide/DiskUsage.ltx
new file mode 100644
index 00000000..38dfe466
--- /dev/null
+++ b/Doc/Source/RomWBW User Guide/DiskUsage.ltx
@@ -0,0 +1,15 @@
+\chapter{Disk Usage}
+
+\blindtext
+
+\section{Preparing Disk Media}
+
+\blindtext
+
+\section{Disk Images}
+
+\blindtext
+
+\section{Placing Operating System on Disk}
+
+\blindtext
\ No newline at end of file
diff --git a/Doc/Source/RomWBW User Guide/Features.ltx b/Doc/Source/RomWBW User Guide/Features.ltx
new file mode 100644
index 00000000..8c0a0500
--- /dev/null
+++ b/Doc/Source/RomWBW User Guide/Features.ltx
@@ -0,0 +1,12 @@
+\chapter{Features}
+
+\blindtext
+
+\section{Real Time Clock}
+
+\blindtext
+
+\section{Directory Time Stamping}
+
+\blindtext
+
diff --git a/Doc/Source/RomWBW User Guide/FormatSamples.ltx b/Doc/Source/RomWBW User Guide/FormatSamples.ltx
new file mode 100644
index 00000000..4920b7df
--- /dev/null
+++ b/Doc/Source/RomWBW User Guide/FormatSamples.ltx
@@ -0,0 +1,83 @@
+\chapter{Formatting Samples}
+
+\blindtext
+
+An itemized list:
+
+\begin{itemize}
+\item First list item
+\item Second list item
+\item Third list item
+\end{itemize}
+
+An enumerated list:
+
+\begin{enumerate}[label=\textbf{\arabic*}.]
+\item First list item
+\item Second list item
+\item Third list item
+\end{enumerate}
+
+A description list:
+
+\begin{description}[style=multiline, leftmargin=1.25in, labelindent=0.25in, align=right]
+\item [Ant] What is an ant?
+\item [Elephant] \blindtext
+\end{description}
+
+%Below is an example of labeling:
+
+%\begin{labeling}{alligator}
+%\item [ant] really busy all the time
+%\item [chimp] likes bananas
+%\item [alligator] very dangerous animal, sharp teeth, long
+%muscular tail and a bit of text that is longer than one
+%line and shows the alignment of text quite nicely
+%\end{labeling}
+
+\textrm{12345}
+
+Here is an output sample (Verbatim):
+
+
+\begin{figure}[ht]
+\setlength\abovecaptionskip{-0.5em}
+\begin{Verbatim}[commandchars=\\\{\}, fontsize=\scriptsize, frame=single, rulecolor=\color{cyan}, numbers=left]
+ROM Image: 'Output\textbackslash{}SBC_simh.rom'
+
+RetroBrew HBIOS v2.8.0-pre.5, 2016-06-22
+
+SBC Z80 @ 20.000MHz ROM=512KB RAM=512KB
+UART0: IO=0x68 8250 MODE=38400,8,N,1
+SIMRTC: Wed 2016-06-22 15:10:17
+MD: UNITS=2 ROMDISK=384KB RAMDISK=384KB
+HDSK: UNITS=2
+
+Below line is 80 characters:
+
+12345678901234567890123456789012345678901234567890123456789012345678901234567890
+\end{Verbatim}
+\caption{Sample Output}
+\label{fig:sampoutput}
+\end{figure}
+
+Table \ref{tab:samptab} is an example of a floating table:
+
+\begin{table}[ht]
+\center
+\setlength{\arrayrulewidth}{2pt}
+\begin{tabular}{l l}
+\toprule
+\bf CPU Board & \bf ROM Image File \\
+\midrule
+SBC v1/v2 & SBC\_std.rom \\
+Zeta v1 & ZETA\_std.rom \\
+Zeta v2 & ZETA2\_std.rom \\
+N8 (2511) & N8\_2511.rom \\
+N8 (2312) & N8\_2312.rom \\
+Mark IV & MK4\_std.rom \\
+\bottomrule
+\end{tabular}
+\caption{Sample Table}
+\label{tab:samptab}
+\end{table}
diff --git a/Doc/Source/RomWBW User Guide/GFDL.ltx b/Doc/Source/RomWBW User Guide/GFDL.ltx
new file mode 100644
index 00000000..73bfeed4
--- /dev/null
+++ b/Doc/Source/RomWBW User Guide/GFDL.ltx
@@ -0,0 +1,481 @@
+\section{GNU Free Documentation License}
+
+\begin{center} Version 1.3, 3 November 2008 \end{center}
+
+\begin{multicols}{2}
+
+\tiny
+\setlength{\parskip}{1em}
+\setlength\columnseprule{.4pt}
+
+Copyright \copyright{} 2000, 2001, 2002, 2007, 2008
+Free Software Foundation, Inc.
+\href{http://fsf.org/}{}
+
+Everyone is permitted to copy and distribute verbatim copies
+of this license document, but changing it is not allowed.
+
+\textbf{0. PREAMBLE}
+
+The purpose of this License is to make a manual, textbook, or other
+functional and useful document ``free'' in the sense of freedom: to
+assure everyone the effective freedom to copy and redistribute it,
+with or without modifying it, either commercially or noncommercially.
+Secondarily, this License preserves for the author and publisher a way
+to get credit for their work, while not being considered responsible
+for modifications made by others.
+
+This License is a kind of ``copyleft'', which means that derivative
+works of the document must themselves be free in the same sense. It
+complements the GNU General Public License, which is a copyleft
+license designed for free software.
+
+We have designed this License in order to use it for manuals for free
+software, because free software needs free documentation: a free
+program should come with manuals providing the same freedoms that the
+software does. But this License is not limited to software manuals;
+it can be used for any textual work, regardless of subject matter or
+whether it is published as a printed book. We recommend this License
+principally for works whose purpose is instruction or reference.
+
+\textbf{1. APPLICABILITY AND DEFINITIONS}
+
+This License applies to any manual or other work, in any medium, that
+contains a notice placed by the copyright holder saying it can be
+distributed under the terms of this License. Such a notice grants a
+world-wide, royalty-free license, unlimited in duration, to use that
+work under the conditions stated herein. The ``Document'', below,
+refers to any such manual or work. Any member of the public is a
+licensee, and is addressed as ``you''. You accept the license if you
+copy, modify or distribute the work in a way requiring permission
+under copyright law.
+
+A ``Modified Version'' of the Document means any work containing the
+Document or a portion of it, either copied verbatim, or with
+modifications and/or translated into another language.
+
+A ``Secondary Section'' is a named appendix or a front-matter section of
+the Document that deals exclusively with the relationship of the
+publishers or authors of the Document to the Document's overall subject
+(or to related matters) and contains nothing that could fall directly
+within that overall subject. (Thus, if the Document is in part a
+textbook of mathematics, a Secondary Section may not explain any
+mathematics.) The relationship could be a matter of historical
+connection with the subject or with related matters, or of legal,
+commercial, philosophical, ethical or political position regarding
+them.
+
+The ``Invariant Sections'' are certain Secondary Sections whose titles
+are designated, as being those of Invariant Sections, in the notice
+that says that the Document is released under this License. If a
+section does not fit the above definition of Secondary then it is not
+allowed to be designated as Invariant. The Document may contain zero
+Invariant Sections. If the Document does not identify any Invariant
+Sections then there are none.
+
+The ``Cover Texts'' are certain short passages of text that are listed,
+as Front-Cover Texts or Back-Cover Texts, in the notice that says that
+the Document is released under this License. A Front-Cover Text may
+be at most 5 words, and a Back-Cover Text may be at most 25 words.
+
+A ``Transparent'' copy of the Document means a machine-readable copy,
+represented in a format whose specification is available to the
+general public, that is suitable for revising the document
+straightforwardly with generic text editors or (for images composed of
+pixels) generic paint programs or (for drawings) some widely available
+drawing editor, and that is suitable for input to text formatters or
+for automatic translation to a variety of formats suitable for input
+to text formatters. A copy made in an otherwise Transparent file
+format whose markup, or absence of markup, has been arranged to thwart
+or discourage subsequent modification by readers is not Transparent.
+An image format is not Transparent if used for any substantial amount
+of text. A copy that is not ``Transparent'' is called ``Opaque''.
+
+Examples of suitable formats for Transparent copies include plain
+ASCII without markup, Texinfo input format, LaTeX input format, SGML
+or XML using a publicly available DTD, and standard-conforming simple
+HTML, PostScript or PDF designed for human modification. Examples of
+transparent image formats include PNG, XCF and JPG. Opaque formats
+include proprietary formats that can be read and edited only by
+proprietary word processors, SGML or XML for which the DTD and/or
+processing tools are not generally available, and the
+machine-generated HTML, PostScript or PDF produced by some word
+processors for output purposes only.
+
+The ``Title Page'' means, for a printed book, the title page itself,
+plus such following pages as are needed to hold, legibly, the material
+this License requires to appear in the title page. For works in
+formats which do not have any title page as such, ``Title Page'' means
+the text near the most prominent appearance of the work's title,
+preceding the beginning of the body of the text.
+
+The ``publisher'' means any person or entity that distributes
+copies of the Document to the public.
+
+A section ``Entitled XYZ'' means a named subunit of the Document whose
+title either is precisely XYZ or contains XYZ in parentheses following
+text that translates XYZ in another language. (Here XYZ stands for a
+specific section name mentioned below, such as ``Acknowledgements'',
+``Dedications'', ``Endorsements'', or ``History''.)
+To ``Preserve the Title''
+of such a section when you modify the Document means that it remains a
+section ``Entitled XYZ'' according to this definition.
+
+The Document may include Warranty Disclaimers next to the notice which
+states that this License applies to the Document. These Warranty
+Disclaimers are considered to be included by reference in this
+License, but only as regards disclaiming warranties: any other
+implication that these Warranty Disclaimers may have is void and has
+no effect on the meaning of this License.
+
+\textbf{2. VERBATIM COPYING}
+
+You may copy and distribute the Document in any medium, either
+commercially or noncommercially, provided that this License, the
+copyright notices, and the license notice saying this License applies
+to the Document are reproduced in all copies, and that you add no other
+conditions whatsoever to those of this License. You may not use
+technical measures to obstruct or control the reading or further
+copying of the copies you make or distribute. However, you may accept
+compensation in exchange for copies. If you distribute a large enough
+number of copies you must also follow the conditions in section~3.
+
+You may also lend copies, under the same conditions stated above, and
+you may publicly display copies.
+
+\textbf{3. COPYING IN QUANTITY}
+
+If you publish printed copies (or copies in media that commonly have
+printed covers) of the Document, numbering more than 100, and the
+Document's license notice requires Cover Texts, you must enclose the
+copies in covers that carry, clearly and legibly, all these Cover
+Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
+the back cover. Both covers must also clearly and legibly identify
+you as the publisher of these copies. The front cover must present
+the full title with all words of the title equally prominent and
+visible. You may add other material on the covers in addition.
+Copying with changes limited to the covers, as long as they preserve
+the title of the Document and satisfy these conditions, can be treated
+as verbatim copying in other respects.
+
+If the required texts for either cover are too voluminous to fit
+legibly, you should put the first ones listed (as many as fit
+reasonably) on the actual cover, and continue the rest onto adjacent
+pages.
+
+If you publish or distribute Opaque copies of the Document numbering
+more than 100, you must either include a machine-readable Transparent
+copy along with each Opaque copy, or state in or with each Opaque copy
+a computer-network location from which the general network-using
+public has access to download using public-standard network protocols
+a complete Transparent copy of the Document, free of added material.
+If you use the latter option, you must take reasonably prudent steps,
+when you begin distribution of Opaque copies in quantity, to ensure
+that this Transparent copy will remain thus accessible at the stated
+location until at least one year after the last time you distribute an
+Opaque copy (directly or through your agents or retailers) of that
+edition to the public.
+
+It is requested, but not required, that you contact the authors of the
+Document well before redistributing any large number of copies, to give
+them a chance to provide you with an updated version of the Document.
+
+\textbf{4. MODIFICATIONS}
+
+You may copy and distribute a Modified Version of the Document under
+the conditions of sections 2 and 3 above, provided that you release
+the Modified Version under precisely this License, with the Modified
+Version filling the role of the Document, thus licensing distribution
+and modification of the Modified Version to whoever possesses a copy
+of it. In addition, you must do these things in the Modified Version:
+
+\begin{itemize}[leftmargin=*]
+
+\item[A.] Use in the Title Page (and on the covers, if any) a title distinct
+from that of the Document, and from those of previous versions
+(which should, if there were any, be listed in the History section
+of the Document). You may use the same title as a previous version
+if the original publisher of that version gives permission.
+
+\item[B.] List on the Title Page, as authors, one or more persons or entities
+responsible for authorship of the modifications in the Modified
+Version, together with at least five of the principal authors of the
+Document (all of its principal authors, if it has fewer than five),
+unless they release you from this requirement.
+
+\item[C.] State on the Title page the name of the publisher of the
+Modified Version, as the publisher.
+
+\item[D.] Preserve all the copyright notices of the Document.
+
+\item[E.] Add an appropriate copyright notice for your modifications
+adjacent to the other copyright notices.
+
+\item[F.] Include, immediately after the copyright notices, a license notice
+giving the public permission to use the Modified Version under the
+terms of this License, in the form shown in the Addendum below.
+
+\item[G.] Preserve in that license notice the full lists of Invariant Sections
+and required Cover Texts given in the Document's license notice.
+
+\item[H.] Include an unaltered copy of this License.
+
+\item[I.] Preserve the section Entitled ``History'', Preserve its Title, and add
+to it an item stating at least the title, year, new authors, and
+publisher of the Modified Version as given on the Title Page. If
+there is no section Entitled ``History'' in the Document, create one
+stating the title, year, authors, and publisher of the Document as
+given on its Title Page, then add an item describing the Modified
+Version as stated in the previous sentence.
+
+\item[J.] Preserve the network location, if any, given in the Document for
+public access to a Transparent copy of the Document, and likewise
+the network locations given in the Document for previous versions
+it was based on. These may be placed in the ``History'' section.
+You may omit a network location for a work that was published at
+least four years before the Document itself, or if the original
+publisher of the version it refers to gives permission.
+
+\item[K.] For any section Entitled ``Acknowledgements'' or ``Dedications'',
+Preserve the Title of the section, and preserve in the section all
+the substance and tone of each of the contributor acknowledgements
+and/or dedications given therein.
+
+\item[L.] Preserve all the Invariant Sections of the Document,
+unaltered in their text and in their titles. Section numbers
+or the equivalent are not considered part of the section titles.
+
+\item[M.] Delete any section Entitled ``Endorsements''. Such a section
+may not be included in the Modified Version.
+
+\item[N.] Do not retitle any existing section to be Entitled ``Endorsements''
+or to conflict in title with any Invariant Section.
+
+\item[O.] Preserve any Warranty Disclaimers.
+
+\end{itemize}
+
+If the Modified Version includes new front-matter sections or
+appendices that qualify as Secondary Sections and contain no material
+copied from the Document, you may at your option designate some or all
+of these sections as invariant. To do this, add their titles to the
+list of Invariant Sections in the Modified Version's license notice.
+These titles must be distinct from any other section titles.
+
+You may add a section Entitled ``Endorsements'', provided it contains
+nothing but endorsements of your Modified Version by various
+parties---for example, statements of peer review or that the text has
+been approved by an organization as the authoritative definition of a
+standard.
+
+You may add a passage of up to five words as a Front-Cover Text, and a
+passage of up to 25 words as a Back-Cover Text, to the end of the list
+of Cover Texts in the Modified Version. Only one passage of
+Front-Cover Text and one of Back-Cover Text may be added by (or
+through arrangements made by) any one entity. If the Document already
+includes a cover text for the same cover, previously added by you or
+by arrangement made by the same entity you are acting on behalf of,
+you may not add another; but you may replace the old one, on explicit
+permission from the previous publisher that added the old one.
+
+The author(s) and publisher(s) of the Document do not by this License
+give permission to use their names for publicity for or to assert or
+imply endorsement of any Modified Version.
+
+\textbf{5. COMBINING DOCUMENTS}
+
+You may combine the Document with other documents released under this
+License, under the terms defined in section~4 above for modified
+versions, provided that you include in the combination all of the
+Invariant Sections of all of the original documents, unmodified, and
+list them all as Invariant Sections of your combined work in its
+license notice, and that you preserve all their Warranty Disclaimers.
+
+The combined work need only contain one copy of this License, and
+multiple identical Invariant Sections may be replaced with a single
+copy. If there are multiple Invariant Sections with the same name but
+different contents, make the title of each such section unique by
+adding at the end of it, in parentheses, the name of the original
+author or publisher of that section if known, or else a unique number.
+Make the same adjustment to the section titles in the list of
+Invariant Sections in the license notice of the combined work.
+
+In the combination, you must combine any sections Entitled ``History''
+in the various original documents, forming one section Entitled
+``History''; likewise combine any sections Entitled ``Acknowledgements'',
+and any sections Entitled ``Dedications''. You must delete all sections
+Entitled ``Endorsements''.
+
+\textbf{6. COLLECTIONS OF DOCUMENTS}
+
+You may make a collection consisting of the Document and other documents
+released under this License, and replace the individual copies of this
+License in the various documents with a single copy that is included in
+the collection, provided that you follow the rules of this License for
+verbatim copying of each of the documents in all other respects.
+
+You may extract a single document from such a collection, and distribute
+it individually under this License, provided you insert a copy of this
+License into the extracted document, and follow this License in all
+other respects regarding verbatim copying of that document.
+
+
+\textbf{7. AGGREGATION WITH INDEPENDENT WORKS}
+
+A compilation of the Document or its derivatives with other separate
+and independent documents or works, in or on a volume of a storage or
+distribution medium, is called an ``aggregate'' if the copyright
+resulting from the compilation is not used to limit the legal rights
+of the compilation's users beyond what the individual works permit.
+When the Document is included in an aggregate, this License does not
+apply to the other works in the aggregate which are not themselves
+derivative works of the Document.
+
+If the Cover Text requirement of section~3 is applicable to these
+copies of the Document, then if the Document is less than one half of
+the entire aggregate, the Document's Cover Texts may be placed on
+covers that bracket the Document within the aggregate, or the
+electronic equivalent of covers if the Document is in electronic form.
+Otherwise they must appear on printed covers that bracket the whole
+aggregate.
+
+\textbf{8. TRANSLATION}
+
+Translation is considered a kind of modification, so you may
+distribute translations of the Document under the terms of section~4.
+Replacing Invariant Sections with translations requires special
+permission from their copyright holders, but you may include
+translations of some or all Invariant Sections in addition to the
+original versions of these Invariant Sections. You may include a
+translation of this License, and all the license notices in the
+Document, and any Warranty Disclaimers, provided that you also include
+the original English version of this License and the original versions
+of those notices and disclaimers. In case of a disagreement between
+the translation and the original version of this License or a notice
+or disclaimer, the original version will prevail.
+
+If a section in the Document is Entitled ``Acknowledgements'',
+``Dedications'', or ``History'', the requirement (section~4) to Preserve
+its Title (section~1) will typically require changing the actual
+title.
+
+\textbf{9. TERMINATION}
+
+You may not copy, modify, sublicense, or distribute the Document
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense, or distribute it is void, and
+will automatically terminate your rights under this License.
+
+However, if you cease all violation of this License, then your license
+from a particular copyright holder is reinstated (a) provisionally,
+unless and until the copyright holder explicitly and finally
+terminates your license, and (b) permanently, if the copyright holder
+fails to notify you of the violation by some reasonable means prior to
+60 days after the cessation.
+
+Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, receipt of a copy of some or all of the same material does
+not give you any rights to use it.
+
+\textbf{10. FUTURE REVISIONS OF THIS LICENSE}
+
+The Free Software Foundation may publish new, revised versions
+of the GNU Free Documentation License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns. See
+\href{http://www.gnu.org/copyleft/}{http://www.gnu.org/copyleft/}.
+
+Each version of the License is given a distinguishing version number.
+If the Document specifies that a particular numbered version of this
+License ``or any later version'' applies to it, you have the option of
+following the terms and conditions either of that specified version or
+of any later version that has been published (not as a draft) by the
+Free Software Foundation. If the Document does not specify a version
+number of this License, you may choose any version ever published (not
+as a draft) by the Free Software Foundation. If the Document
+specifies that a proxy can decide which future versions of this
+License can be used, that proxy's public statement of acceptance of a
+version permanently authorizes you to choose that version for the
+Document.
+
+\textbf{11. RELICENSING}
+
+``Massive Multiauthor Collaboration Site'' (or ``MMC Site'') means any
+World Wide Web server that publishes copyrightable works and also
+provides prominent facilities for anybody to edit those works. A
+public wiki that anybody can edit is an example of such a server. A
+``Massive Multiauthor Collaboration'' (or ``MMC'') contained in the
+site means any set of copyrightable works thus published on the MMC
+site.
+
+``CC-BY-SA'' means the Creative Commons Attribution-Share Alike 3.0
+license published by Creative Commons Corporation, a not-for-profit
+corporation with a principal place of business in San Francisco,
+California, as well as future copyleft versions of that license
+published by that same organization.
+
+``Incorporate'' means to publish or republish a Document, in whole or
+in part, as part of another Document.
+
+An MMC is ``eligible for relicensing'' if it is licensed under this
+License, and if all works that were first published under this License
+somewhere other than this MMC, and subsequently incorporated in whole
+or in part into the MMC, (1) had no cover texts or invariant sections,
+and (2) were thus incorporated prior to November 1, 2008.
+
+The operator of an MMC Site may republish an MMC contained in the site
+under CC-BY-SA on the same site at any time before August 1, 2009,
+provided the MMC is eligible for relicensing.
+
+\textbf{ADDENDUM: How to use this License for your documents}
+
+To use this License in a document you have written, include a copy of
+the License in the document and put the following copyright and
+license notices just after the title page:
+
+\begingroup
+\leftskip=2em
+\slshape
+
+Copyright \copyright{} YEAR YOUR NAME.
+
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.3
+or any later version published by the Free Software Foundation;
+with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
+A copy of the license is included in the section entitled ``GNU
+Free Documentation License''.
+
+\endgroup
+
+If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
+replace the ``with \dots\ Texts.''\ line with this:
+
+\begingroup
+\leftskip=2em
+\slshape
+
+with the Invariant Sections being LIST THEIR TITLES, with the
+Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
+
+\endgroup
+
+If you have Invariant Sections without Cover Texts, or some other
+combination of the three, merge those two alternatives to suit the
+situation.
+
+If your document contains nontrivial examples of program code, we
+recommend releasing these examples in parallel under your choice of
+free software license, such as the GNU General Public License,
+to permit their use in free software.
+
+\end{multicols}
\ No newline at end of file
diff --git a/Doc/Source/RomWBW User Guide/GPL.ltx b/Doc/Source/RomWBW User Guide/GPL.ltx
new file mode 100644
index 00000000..b95a8596
--- /dev/null
+++ b/Doc/Source/RomWBW User Guide/GPL.ltx
@@ -0,0 +1,733 @@
+\section{GNU General Public License}
+
+\begin{center} Version 3, 29 June 2007 \end{center}
+
+\begin{multicols}{2}
+
+\tiny
+\setlength{\parskip}{1em}
+\setlength\columnseprule{.4pt}
+
+Copyright \copyright{} 2007 Free Software Foundation, Inc.
+\href{http://fsf.org/}{http://fsf.org/}
+
+Everyone is permitted to copy and distribute verbatim copies of this
+license document, but changing it is not allowed.
+
+\bigskip
+{\scriptsize \textbf{Preamble}}
+
+The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom
+to share and change all versions of a program--to make sure it
+remains free software for all its users. We, the Free Software
+Foundation, use the GNU General Public License for most of our
+software; it applies also to any other work released this way by its
+authors. You can apply it to your programs, too.
+
+When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge
+for them if you wish), that you receive source code or can get it if
+you want it, that you can change the software or use pieces of it in
+new free programs, and that you know you can do these things.
+
+To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you
+have certain responsibilities if you distribute copies of the
+software, or if you modify it: responsibilities to respect the
+freedom of others.
+
+For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too,
+receive or can get the source code. And you must show them these
+terms so they know their rights.
+
+Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the
+manufacturer can do so. This is fundamentally incompatible with the
+aim of protecting users' freedom to change the software. The
+systematic pattern of such abuse occurs in the area of products for
+individuals to use, which is precisely where it is most unacceptable.
+Therefore, we have designed this version of the GPL to prohibit the
+practice for those products. If such problems arise substantially in
+other domains, we stand ready to extend this provision to those
+domains in future versions of the GPL, as needed to protect the
+freedom of users.
+
+Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish
+to avoid the special danger that patents applied to a free program
+could make it effectively proprietary. To prevent this, the GPL
+assures that patents cannot be used to render the program non-free.
+
+The precise terms and conditions for copying, distribution and
+modification follow.
+
+\bigskip
+{\scriptsize \textbf{TERMS AND CONDITIONS}}
+
+\textbf{0. Definitions.}
+
+``This License'' refers to version 3 of the GNU General Public License.
+
+``Copyright'' also means copyright-like laws that apply to other
+kinds of works, such as semiconductor masks.
+
+``The Program'' refers to any copyrightable work licensed under this
+License. Each licensee is addressed as ``you''. ``Licensees'' and
+``recipients'' may be individuals or organizations.
+
+To ``modify'' a work means to copy from or adapt all or part of the
+work in a fashion requiring copyright permission, other than the
+making of an exact copy. The resulting work is called a ``modified
+version'' of the earlier work or a work ``based on'' the earlier work.
+
+A ``covered work'' means either the unmodified Program or a work
+based on the Program.
+
+To ``propagate'' a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+To ``convey'' a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user
+through a computer network, with no transfer of a copy, is not
+conveying.
+
+An interactive user interface displays ``Appropriate Legal Notices''
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+\textbf{1. Source Code.}
+
+The ``source code'' for a work means the preferred form of the work
+for making modifications to it. ``Object code'' means any non-source
+form of a work.
+
+A ``Standard Interface'' means an interface that either is an
+official standard defined by a recognized standards body, or, in the
+case of interfaces specified for a particular programming language,
+one that is widely used among developers working in that language.
+
+The ``System Libraries'' of an executable work include anything,
+other than the work as a whole, that (a) is included in the normal
+form of packaging a Major Component, but which is not part of that
+Major Component, and (b) serves only to enable use of the work with
+that Major Component, or to implement a Standard Interface for which
+an implementation is available to the public in source code form. A
+``Major Component'', in this context, means a major essential
+component (kernel, window system, and so on) of the specific
+operating system (if any) on which the executable work runs, or a
+compiler used to produce the work, or an object code interpreter used
+to run it.
+
+The ``Corresponding Source'' for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts
+to control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available
+free programs which are used unmodified in performing those
+activities but which are not part of the work. For example,
+Corresponding Source includes interface definition files associated
+with source files for the work, and the source code for shared
+libraries and dynamically linked subprograms that the work is
+specifically designed to require, such as by intimate data
+communication or control flow between those subprograms and other
+parts of the work.
+
+The Corresponding Source need not include anything that users can
+regenerate automatically from other parts of the Corresponding Source.
+
+The Corresponding Source for a work in source code form is that same
+work.
+
+\textbf{2. Basic Permissions.}
+
+All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+You may make, run and propagate covered works that you do not convey,
+without conditions so long as your license otherwise remains in
+force. You may convey covered works to others for the sole purpose of
+having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply
+with the terms of this License in conveying all material for which
+you do not control copyright. Those thus making or running the
+covered works for you must do so exclusively on your behalf, under
+your direction and control, on terms that prohibit them from making
+any copies of your copyrighted material outside their relationship
+with you.
+
+Conveying under any other circumstances is permitted solely under the
+conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+\textbf{3. Protecting Users' Legal Rights From Anti-Circumvention Law.}
+
+No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such measures.
+
+When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such
+circumvention is effected by exercising rights under this License
+with respect to the covered work, and you disclaim any intention to
+limit operation or modification of the work as a means of enforcing,
+against the work's users, your or third parties' legal rights to
+forbid circumvention of technological measures.
+
+\textbf{4. Conveying Verbatim Copies.}
+
+You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the
+code; keep intact all notices of the absence of any warranty; and
+give all recipients a copy of this License along with the Program.
+
+You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+\textbf{5. Conveying Modified Source Versions.}
+
+You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these
+conditions:
+
+\begin{itemize}[leftmargin=*]
+
+\item[a)] The work must carry prominent notices stating that you
+modified it, and giving a relevant date.
+
+\item[b)] The work must carry prominent notices stating that it is
+released under this License and any conditions added under section 7.
+This requirement modifies the requirement in section 4 to ``keep
+intact all notices''.
+
+\item[c)] You must license the entire work, as a whole, under this
+License to anyone who comes into possession of a copy. This License
+will therefore apply, along with any applicable section 7 additional
+terms, to the whole of the work, and all its parts, regardless of how
+they are packaged. This License gives no permission to license the
+work in any other way, but it does not invalidate such permission if
+you have separately received it.
+
+\item[d)] If the work has interactive user interfaces, each must
+display Appropriate Legal Notices; however, if the Program has
+interactive interfaces that do not display Appropriate Legal Notices,
+your work need not make them do so.
+
+\end{itemize}
+
+A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+``aggregate'' if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+\textbf{6. Conveying Non-Source Forms.}
+
+You may convey a covered work in object code form under the terms of
+sections 4 and 5, provided that you also convey the machine-readable
+Corresponding Source under the terms of this License, in one of these
+ways:
+
+\begin{itemize}[leftmargin=*]
+
+\item[a)] Convey the object code in, or embodied in, a physical
+product (including a physical distribution medium), accompanied by
+the Corresponding Source fixed on a durable physical medium
+customarily used for software interchange.
+
+\item[b)] Convey the object code in, or embodied in, a physical
+product (including a physical distribution medium), accompanied by a
+written offer, valid for at least three years and valid for as long
+as you offer spare parts or customer support for that product model,
+to give anyone who possesses the object code either (1) a copy of the
+Corresponding Source for all the software in the product that is
+covered by this License, on a durable physical medium customarily
+used for software interchange, for a price no more than your
+reasonable cost of physically performing this conveying of source, or
+(2) access to copy the Corresponding Source from a network server at
+no charge.
+
+\item[c)] Convey individual copies of the object code with a copy of
+the written offer to provide the Corresponding Source. This
+alternative is allowed only occasionally and noncommercially, and
+only if you received the object code with such an offer, in accord
+with subsection 6b.
+
+\item[d)] Convey the object code by offering access from a designated
+place (gratis or for a charge), and offer equivalent access to the
+Corresponding Source in the same way through the same place at no
+further charge. You need not require recipients to copy the
+Corresponding Source along with the object code. If the place to copy
+the object code is a network server, the Corresponding Source may be
+on a different server (operated by you or a third party) that
+supports equivalent copying facilities, provided you maintain clear
+directions next to the object code saying where to find the
+Corresponding Source. Regardless of what server hosts the
+Corresponding Source, you remain obligated to ensure that it is
+available for as long as needed to satisfy these requirements.
+
+\item[e)] Convey the object code using peer-to-peer transmission,
+provided you inform other peers where the object code and
+Corresponding Source of the work are being offered to the general
+public at no charge under subsection 6d.
+
+\end{itemize}
+
+A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+A ``User Product'' is either (1) a ``consumer product'', which means
+any tangible personal property which is normally used for personal,
+family, or household purposes, or (2) anything designed or sold for
+incorporation into a dwelling. In determining whether a product is a
+consumer product, doubtful cases shall be resolved in favor of
+coverage. For a particular product received by a particular user,
+``normally used'' refers to a typical or common use of that class of
+product, regardless of the status of the particular user or of the
+way in which the particular user actually uses, or expects or is
+expected to use, the product. A product is a consumer product
+regardless of whether the product has substantial commercial,
+industrial or non-consumer uses, unless such uses represent the only
+significant mode of use of the product.
+
+``Installation Information'' for a User Product means any methods,
+procedures, authorization keys, or other information required to
+install and execute modified versions of a covered work in that User
+Product from a modified version of its Corresponding Source. The
+information must suffice to ensure that the continued functioning of
+the modified object code is in no case prevented or interfered with
+solely because modification has been made.
+
+If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+The requirement to provide Installation Information does not include
+a requirement to continue to provide support service, warranty, or
+updates for a work that has been modified or installed by the
+recipient, or for the User Product in which it has been modified or
+installed. Access to a network may be denied when the modification
+itself materially and adversely affects the operation of the network
+or violates the rules and protocols for communication across the
+network.
+
+Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+\textbf{7. Additional Terms.}
+
+``Additional permissions'' are terms that supplement the terms of
+this License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program
+shall be treated as though they were included in this License, to the
+extent that they are valid under applicable law. If additional
+permissions apply only to part of the Program, that part may be used
+separately under those permissions, but the entire Program remains
+governed by this License without regard to the additional permissions.
+
+When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright
+holders of that material) supplement the terms of this License with
+terms:
+
+\begin{itemize}[leftmargin=*]
+
+\item[a)] Disclaiming warranty or limiting liability differently from
+the terms of sections 15 and 16 of this License; or
+
+\item[b)] Requiring preservation of specified reasonable legal
+notices or author attributions in that material or in the Appropriate
+Legal Notices displayed by works containing it; or
+
+\item[c)] Prohibiting misrepresentation of the origin of that
+material, or requiring that modified versions of such material be
+marked in reasonable ways as different from the original version; or
+
+\item[d)] Limiting the use for publicity purposes of names of
+licensors or authors of the material; or
+
+\item[e)] Declining to grant rights under trademark law for use of
+some trade names, trademarks, or service marks; or
+
+\item[f)] Requiring indemnification of licensors and authors of that
+material by anyone who conveys the material (or modified versions of
+it) with contractual assumptions of liability to the recipient, for
+any liability that these contractual assumptions directly impose on
+those licensors and authors.
+
+\end{itemize}
+
+All other non-permissive additional terms are considered ``further
+restrictions'' within the meaning of section 10. If the Program as
+you received it, or any part of it, contains a notice stating that it
+is governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions; the
+above requirements apply either way.
+
+\textbf{8. Termination.}
+
+You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the
+copyright holder fails to notify you of the violation by some
+reasonable means prior to 60 days after the cessation.
+
+Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+\textbf{9. Acceptance Not Required for Having Copies.}
+
+You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+\textbf{10. Automatic Licensing of Downstream Recipients.}
+
+Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+An ``entity transaction'' is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate
+litigation (including a cross-claim or counterclaim in a lawsuit)
+alleging that any patent claim is infringed by making, using,
+selling, offering for sale, or importing the Program or any portion
+of it.
+
+\textbf{11. Patents.}
+
+A ``contributor'' is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's ``contributor version''.
+
+A contributor's ``essential patent claims'' are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor
+version, but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, ``control'' includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+In the following three paragraphs, a ``patent license'' is any
+express agreement or commitment, however denominated, not to enforce
+a patent (such as an express permission to practice a patent or
+covenant not to sue for patent infringement). To ``grant'' such a
+patent license to a party means to make such an agreement or
+commitment not to enforce a patent against the party.
+
+If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through
+a publicly available network server or other readily accessible
+means, then you must either (1) cause the Corresponding Source to be
+so available, or (2) arrange to deprive yourself of the benefit of
+the patent license for this particular work, or (3) arrange, in a
+manner consistent with the requirements of this License, to extend
+the patent license to downstream recipients. ``Knowingly relying''
+means you have actual knowledge that, but for the patent license,
+your conveying the covered work in a country, or your recipient's use
+of the covered work in a country, would infringe one or more
+identifiable patents in that country that you have reason to believe
+are valid.
+
+If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent
+license you grant is automatically extended to all recipients of the
+covered work and works based on it.
+
+A patent license is ``discriminatory'' if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make
+payment to the third party based on the extent of your activity of
+conveying the work, and under which the third party grants, to any of
+the parties who would receive the covered work from you, a
+discriminatory patent license (a) in connection with copies of the
+covered work conveyed by you (or copies made from those copies), or
+(b) primarily for and in connection with specific products or
+compilations that contain the covered work, unless you entered into
+that arrangement, or that patent license was granted, prior to 28
+March 2007.
+
+Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+\textbf{12. No Surrender of Others' Freedom.}
+
+If conditions are imposed on you (whether by court order, agreement
+or otherwise) that contradict the conditions of this License, they do
+not excuse you from the conditions of this License. If you cannot
+convey a covered work so as to satisfy simultaneously your
+obligations under this License and any other pertinent obligations,
+then as a consequence you may not convey it at all. For example, if
+you agree to terms that obligate you to collect a royalty for further
+conveying from those to whom you convey the Program, the only way you
+could satisfy both those terms and this License would be to refrain
+entirely from conveying the Program.
+
+\textbf{13. Use with the GNU Affero General Public License.}
+
+Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a
+single combined work, and to convey the resulting work. The terms of
+this License will continue to apply to the part which is the covered
+work, but the special requirements of the GNU Affero General Public
+License, section 13, concerning interaction through a network will
+apply to the combination as such.
+
+\textbf{14. Revised Versions of this License.}
+
+The Free Software Foundation may publish revised and/or new versions
+of the GNU General Public License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies that a certain numbered version of the GNU General Public
+License ``or any later version'' applies to it, you have the option
+of following the terms and conditions either of that numbered version
+or of any later version published by the Free Software Foundation. If
+the Program does not specify a version number of the GNU General
+Public License, you may choose any version ever published by the Free
+Software Foundation.
+
+If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes
+you to choose that version for the Program.
+
+Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+\textbf{15. Disclaimer of Warranty.}
+
+THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM ``AS IS'' WITHOUT
+WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
+PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE
+DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR
+CORRECTION.
+
+\textbf{16. Limitation of Liability.}
+
+IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR
+CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES
+ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT
+NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR
+LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM
+TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER
+PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+\textbf{17. Interpretation of Sections 15 and 16.}
+
+If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+END OF TERMS AND CONDITIONS
+
+\bigskip
+{\scriptsize \textbf{How to Apply These Terms to Your New Programs}}
+
+If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make
+it free software which everyone can redistribute and change under
+these terms.
+
+To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the ``copyright'' line and a pointer to where the full notice is found.
+
+\begingroup
+\leftskip=2em
+\slshape
+
+\\
+Copyright (C)
+
+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 3 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, see
+\href{http://www.gnu.org/licenses/}{http://www.gnu.org/licenses/}.
+
+\endgroup
+
+Also add information on how to contact you by electronic and paper
+mail.
+
+If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+\begingroup
+\leftskip=2em
+\slshape
+
+ Copyright (C) \\
+This program comes with ABSOLUTELY NO WARRANTY; for details type
+`show w'.
+This is free software, and you are welcome to redistribute it
+under certain conditions; type `show c' for details.
+
+\endgroup
+
+The hypothetical commands `show w' and `show c' should show the
+appropriate parts of the General Public License. Of course, your
+program's commands might be different; for a GUI interface, you would
+use an ``about box''.
+
+You should also get your employer (if you work as a programmer) or
+school, if any, to sign a ``copyright disclaimer'' for the program,
+if necessary. For more information on this, and how to apply and
+follow the GNU GPL, see
+\href{http://www.gnu.org/licenses/}{http://www.gnu.org/licenses/}.
+
+The GNU General Public License does not permit incorporating your
+program into proprietary programs. If your program is a subroutine
+library, you may consider it more useful to permit linking
+proprietary applications with the library. If this is what you want
+to do, use the GNU Lesser General Public License instead of this
+License. But first, please read
+\href{http://www.gnu.org/philosophy/why-not-lgpl.html}{http://www.gnu.o
+rg/philosophy/why-not-lgpl.html}.
+
+\end{multicols}
\ No newline at end of file
diff --git a/Doc/Source/RomWBW User Guide/Generate.cmd b/Doc/Source/RomWBW User Guide/Generate.cmd
new file mode 100644
index 00000000..f43109b8
--- /dev/null
+++ b/Doc/Source/RomWBW User Guide/Generate.cmd
@@ -0,0 +1,4 @@
+@echo off
+setlocal
+
+texify -p -V --run-viewer Main.ltx
diff --git a/Doc/Source/RomWBW User Guide/GettingStarted.ltx b/Doc/Source/RomWBW User Guide/GettingStarted.ltx
new file mode 100644
index 00000000..ccfba708
--- /dev/null
+++ b/Doc/Source/RomWBW User Guide/GettingStarted.ltx
@@ -0,0 +1,251 @@
+\chapter{Getting Started}
+
+Because of the wide variety of hardware combinations, there is no "one
+case fits all" approach to getting started. The good news is that RomWBW
+operates very consistently regardless of the specific hardware. The
+operating systems, applications, and storage formats are all common.
+However, building and testing your hardware is entirely outside the scope
+of this document. The RetroBrew Computing Forum
+(https://www.retrobrewcomputers.org/forum) is probably the best place to
+get advice if you get stuck on hardware issues.
+
+\section{SIMH Simulator}
+
+It is not necessary, but I highly recommend running RomWBW under the SIMH
+Simulator as a first step. This requires no hardware and will allow you
+to see how it should look when you use it on real hardware. Since the
+SIMH software is included in the distribution package, you can start it
+with a single command. Using a command prompt window, navigate to the
+high level directory of the distribution. Enter the command "sim" and
+the simulator should start up. The first few lines of output should
+look similar to Figure \ref{fig:simhboot}. You may see some benign
+warning messages that can be ignored.
+
+\begin{figure}[ht]
+\setlength\abovecaptionskip{-0.5em}
+\begin{Verbatim}[commandchars=\\\{\}, fontsize=\scriptsize, frame=single, rulecolor=\color{cyan}, numbers=left]
+ROM Image: 'Output\textbackslash{}SBC_simh.rom'
+
+RetroBrew HBIOS v2.8.0-pre.5, 2016-06-22
+
+SBC Z80 @ 20.000MHz ROM=512KB RAM=512KB
+UART0: IO=0x68 8250 MODE=38400,8,N,1
+SIMRTC: Wed 2016-06-22 15:10:17
+MD: UNITS=2 ROMDISK=384KB RAMDISK=384KB
+HDSK: UNITS=2
+
+\textsl{}
+\end{Verbatim}
+\caption{SIMH Boot Example}
+\label{fig:simhboot}
+\end{figure}
+
+\section{Board Setup}
+
+In all cases, you will want to start with a Z80/Z180 host board. Any of
+the boards listed in System Requirements will work fine. I strongly
+recommend that you initially work on getting just the single host board
+running by itself -- don't even plug it into an ECB backplane.
+
+Given a host board that is assembled and passes any hardware checks
+recommended by the boards designer, you need to make sure the board is
+configured for RomWBW. Refer to the entry in Appendix A for your board
+and confirm that all switches and jumpers on the board are set as
+required by RomWBW.
+
+Your initial goal is to locate and program a ROM image for your host
+board. The ROM images are located in the Output directory. You are
+looking for the files that end in ".rom". Don't worry about all of the
+other variations at this point. Refer to Table \ref{tab:basicromfiles} to
+determine the ROM image that you want.
+
+\begin{table}[ht]
+\center
+%\renewcommand{\arraystretch}{1.5}
+\setlength{\arrayrulewidth}{2pt}
+\begin{tabular}{l l}
+\toprule
+\bf CPU Board & \bf ROM Image File \\
+\midrule
+SBC v1/v2 & SBC\_std.rom \\
+Zeta v1 & ZETA\_std.rom \\
+Zeta v2 & ZETA2\_std.rom \\
+N8 (2511) & N8\_2511.rom \\
+N8 (2312) & N8\_2312.rom \\
+Mark IV & MK4\_std.rom \\
+\bottomrule
+\end{tabular}
+\caption{Basic ROM Files}
+\label{tab:basicromfiles}
+\end{table}
+
+Locate the appropriate ROM image file in the Output directory based on
+Table \ref{tab:basicromfiles}. You should see that the file is exactly 512KB in size.
+As indicated above in System Requirements, your system should have a ROM
+capacity of 512KB or greater. You need to program the file to your ROM
+using whatever tool you have. Programming a ROM chip is beyond the scope
+of this document, but any feel free to ask for help at the RetroBrew
+Computing Forum. The ROM image files are pure binary and should be
+programmed into the ROM chip starting at address 0H thru address 7FFFH (8000H bytes).
+Insert the programmed ROM chip in your system.
+
+Initially, you will need two external connections to your board. Power
+and serial port. All of the CPU boards provide an onboard power
+connection. Refer to the board designer's notes on the RBC Wiki for more
+information on the power connection your board requires.
+
+Finally, you must connect the primary serial port of your host board to a
+terminal using 38,400 baud, 8 data bits, 1 stop bit, and no parity. You can
+use either a dedicated terminal or use terminal emulation software on
+your PC\footnote{Under Windows, Tera Term is a good choice for terminal
+emulation.}.
+When connecting to a standard PC serial port, a null modem cable is required.
+There is a good document on the Wiki that explains cabling of serial ports at
+http://???????. \todo{Need to restore serial port cabling document on Wiki!}
+
+\section{Startup}
+
+System startup (booting) is accomplished simply by applying power. In some cases,
+it may be necessary to press the reset button after applying power to get a
+successful startup.
+
+If everything is working properly, you should see something like Figure \ref{fig:boot}
+on your terminal screen. Your output will vary somewhat depending on your
+specific hardware. The example shown comes from a Mark IV.
+
+\begin{figure}[ht]
+\setlength\abovecaptionskip{-0.5em}
+\begin{Verbatim}[commandchars=\\\{\}, fontsize=\scriptsize, frame=single, rulecolor=\color{cyan}, numbers=left]
+RetroBrew HBIOS v2.8.0-pre.5, 2016-06-03
+
+MARK IV Z180 @ 18.432MHz ROM=512KB RAM=512KB
+ASCI0: IO=0x46,48 MODE=38400,8,N,1
+ASCI1: IO=0x47,49 MODE=38400,8,N,1
+DSRTC: MODE=STD Wed 2016-06-22 15:03:06
+MD: UNITS=2 ROMDISK=384KB RAMDISK=384KB
+IDE: MODE=MK4 IO=0x80 UNITS=2
+IDE0: NO MEDIA
+IDE1: NO MEDIA
+SD: MODE=MK4 FAST OPR=0x89 CNTR=0x4A TRDR=0x4B UNITS=1
+SD0: NO MEDIA
+
+Unit Device Type Capacity/Mode
+---------- ---------- ---------------- --------------------
+Disk 0 MD1: RAM Disk 384KB,LBA
+Disk 1 MD0: ROM Disk 384KB,LBA
+Disk 2 IDE0: Hard Disk --
+Disk 3 IDE1: Hard Disk --
+Disk 4 SD0: SD Card --
+Serial 0 ASCI0: RS-232 38400,8,N,1
+Serial 1 ASCI1: RS-232 38400,8,N,1
+
+MARK IV Z180 Boot Loader
+
+Boot: (C)PM, (Z)System, (M)onitor,
+ (L)ist disks, or Disk Unit # ===>
+\end{Verbatim}
+\caption{Typical Boot Display}
+\label{fig:boot}
+\end{figure}
+
+If you see output on your terminal screen, but it is garbled/unreadable, then
+check the serial port configuration settings on your terminal or terminal
+emulation software.
+
+If you do not see any output of any kind on your terminal screen, the following
+general areas should be checked:
+
+\begin{itemize}
+\item Confirm power is being applied to the board and the the voltage is
+in an acceptable range.
+\item Confirm the ROM is programmed accurately by placing it back in the
+programmer and using the verify function.
+\item Verify the serial connection. When connecting to a PC, make sure
+you have a null modem cable or adapter.
+\item Review your board's construction carefully for chip orientation, bent
+pins, missing or bridged solder joints, etc.
+\end{itemize}
+
+You will find that the RetroBrew Computing Group is very helpful if you get
+stuck. The best way to request assistance is to post a message on the
+Forum.
+
+\section{Boot Display}
+
+As illustrated in Figure \ref{fig:boot}, RomWBW displays a lot of information
+about the system and it's configuration. There are 4 basic sections to
+the boot display.
+
+Line 1 is a banner that identifies the BIOS portion of the ROM including
+version and build date.
+
+Lines 3-12 display the hardware inventory of the system as understood by
+the ROM. Note that some of this information is \emph{not} discovered dynamically --
+it is built into the ROM. So, do not be alarmed if some parts of this
+display do not match your hardware. For example, the RAM and ROM size
+are configured into the ROM itself. You can refer to Appendix A for
+more information on how to read the specific lines.
+
+Lines 14-22 contain a table that summarizes the devices in the system. This
+information is used when the operating system is loaded/configured to
+assign OS devices to system devices.
+
+Lines 24-27 is the display of the boot loader menu and prompt. The boot
+loader allows you to choose the operating mode you want to initiate. These
+options will be described the next section.
+
+\section{Loader}
+
+At the conclusion of a successful system startup, the loader menu/prompt will
+be displayed on the console. The function of the loader is to load an
+operating system or system monitor.
+
+\subsection{Monitor}
+
+Pressing 'M' at the boot loader prompt will launch a basic system monitor.
+The system monitor provides very basic functions that are primarily useful
+for testing components of your system. These functions include displaying
+and modifying memory, reading and writing to I/O ports, etc.
+
+Refer to ??? for monitor operation.
+
+\subsection{CP/M}
+
+Pressing 'C' at the boot loader prompt will launch Digital Research CP/M-80
+Version 2.2. A complete copy of the CP/M operating system is imbedded in
+the ROM and will be loaded directly from there, so no disk access is required.
+
+Initially, drive A will be a RAM drive (initialized with no files). Drive B
+will be a ROM drive. The standard CP/M distribtion files are included on the
+ROM drive (e.g., ASM, PIP, STAT). Drive B will initially be the logged drive.
+At this point, you can execute the programs on drive B. Remember that drive B
+is a ROM drive, so any attempt to write to that drive will result in an error.
+
+Refer to Chapter ?? for more information on using CP/M 2.2.
+
+\subsection{Z-System}
+
+Pressing 'Z' at the boot loader prompt will launch Z-System, a CP/M 2.2
+compatible operating system with many enhancements. As with CP/M, this
+operating system will be loaded directly from ROM.
+
+The drive configuration for Z-System is identical to CP/M.
+
+Refer to Chapter ?? for more information on using Z-System.
+
+\subsection{Disk Boot}
+
+The boot loader also supports loading an operating system from a disk
+device. In this case, you must press the number key corresponding to
+the disk device containing the operating system to be loaded. The
+disk device numbers are the ones listed in the device summary table.
+
+In order to boot from a disk device, it must be properly initialized
+using the SYSCOPY application or equivalent. Attempting to boot a
+disk that has no operating system will result in an error and the
+boot loader prompt will be redisplayed.
+
+You can press 'L' at the boot loader prompt to display a list of
+the disk devices available. The existence of a disk in this list
+does \emph{not} mean that it has been initialized with an
+operating system.
diff --git a/Doc/Source/RomWBW User Guide/Licensing.ltx b/Doc/Source/RomWBW User Guide/Licensing.ltx
new file mode 100644
index 00000000..434b4bb0
--- /dev/null
+++ b/Doc/Source/RomWBW User Guide/Licensing.ltx
@@ -0,0 +1,5 @@
+\chapter{Licensing}
+
+\input{GPL.ltx}
+
+\input{GFDL.ltx}
diff --git a/Doc/Source/RomWBW User Guide/Logo.png b/Doc/Source/RomWBW User Guide/Logo.png
new file mode 100644
index 00000000..3d43ff31
Binary files /dev/null and b/Doc/Source/RomWBW User Guide/Logo.png differ
diff --git a/Doc/Source/RomWBW User Guide/Main.ltx b/Doc/Source/RomWBW User Guide/Main.ltx
new file mode 100644
index 00000000..91652a84
--- /dev/null
+++ b/Doc/Source/RomWBW User Guide/Main.ltx
@@ -0,0 +1,192 @@
+\documentclass[letterpaper,12pt,oneside]{book}
+%\documentclass[letterpaper,12pt,oneside,draft]{book}
+%\usepackage[utf8]{inputenc} % Handle UTF8 input files
+\usepackage[T1]{fontenc} % Allows use of fonts with char codes 128-255
+\usepackage{bookman} % Nice rm font
+\usepackage{ascii} % Nice tt font
+\usepackage[scaled]{helvet} % Nice sf font
+\usepackage{geometry} % Page layout commands
+\usepackage{multicol} % Easy use of multiple columns
+\usepackage{hyperref} % More flexible hyperref formatting (\hypersetup)
+\usepackage{blindtext} % Enable \blindtext
+%\usepackage{scrextend} % A bundle of useful stuff...
+\usepackage[inline]{enumitem} % Prettier version of enumerate list
+%\usepackage{color} % Enable colors?
+\usepackage{framed} % Enable framing (used in examples)
+\usepackage{graphicx} % Add support for imbedding graphics
+\usepackage{fancyhdr} % More flexible header formatting
+\usepackage{xhfill} % Enable \xrfill used in footer
+\usepackage{booktabs} % Improved table formattting
+\usepackage{fancyvrb} % Enhances \verbatim to allow internal formatting
+\usepackage{tocloft} % More versatile toc/lof/lot formatting
+\usepackage{bookmark} % Avoids "Package rerunfilecheck Warning"
+%\usepackage{showframe} % Diagnostic
+
+\title{RomWBW User Guide\\Version 2.8}
+\author{Wayne Warthen\\wwarthen@gmail.com\\\\RetroBrew Computing Group\\http://www.retrobrewcomputers.org}
+\date{\today}
+
+%
+% PDF construction options
+%
+
+%\pdfminorversion=5
+%%\pdfobjcompresslevel=1
+%\pdfobjcompresslevel=3
+%\pdfcompresslevel=9
+
+%
+% Global page layout and formatting
+%
+
+%\renewcommand*\ttdefault{ascii}
+%\renewcommand*\rmdefault{bookman}
+%\renewcommand*\sfdefault{ascii}
+\renewcommand*{\familydefault}{\sfdefault}
+\geometry{letterpaper, margin=1.5in}
+\setlength{\headheight}{14pt}
+%\setlength\papermarginwidth{1.5in}
+%\settextfraction{1.0}
+%\setlength\textheight{5in}
+%\renewcommand{\baselinestretch}{1.1}
+\setlength\parskip{1.2em}
+\setlength\parindent{0pt}
+\setlist{topsep=0pt}
+\sloppy
+
+\newcommand\todo[1]{\textcolor{red}{[TODO: #1]}}
+\hypersetup{colorlinks=true}
+%\addtokomafont{labelinglabel}{\bfseries} % Make list labels bold
+
+\renewcommand{\chaptername}{Section}
+
+\begin{document}
+
+%
+% Start of frontmatter
+%
+
+\frontmatter
+\pagestyle{plain}
+
+%\maketitle
+\begin{titlepage}
+ \centering
+ \par
+ \vspace*{72pt}
+ \includegraphics{Logo.png} \par
+ \vfill
+ \raggedleft
+ {\scshape \bfseries \fontsize{48pt}{56pt} \selectfont RomWBW \par}
+ {\bfseries \fontsize{32pt}{36pt} \selectfont User Guide \par}
+ \vspace{24pt}
+ {\huge Version 2.8 \\ \today \par}
+ \vspace{24pt}
+ {\large \itshape RetroBrew Computing Group \\ \href{http://www.retrobrewcomputers.org}{www.retrobrewcomputers.org} \par}
+ \vspace{12pt}
+ {\large \itshape Wayne Warthen \\ \href{mailto:wwarthen@gmail.com}{wwarthen@gmail.com} \par}
+\end{titlepage}
+
+\setcounter{page}{2}
+
+\begin{center} \Large \uppercase{Copyright} \end{center}
+
+Copyright \copyright{} 2016 Wayne Warthen
+
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.3
+or any later version published by the Free Software Foundation;
+with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
+A copy of the license is included in the section entitled "GNU
+Free Documentation License".
+
+\bigskip
+\begin{center} \Large \uppercase{Disclaimer} \end{center}
+
+The author makes no representations or warranties with respect to the contents hereof and
+specifically disclaims any implied warranties of merchantability or fitness for any particular
+purpose. Further, the author reserves the right to revise this publication and to make
+changes from time to time in the content hereof without obligation of the author to notify
+any person of such revision or changes.
+
+\bigskip
+\begin{center} \Large \uppercase{Trademarks} \end{center}
+
+CP/M is a registered trademark of Digital Research. ASM, DESPOOL, DDT,
+LINK-80, MAC, MP/M, PL/1-80 and SID are trademarks of Digital Research. Intel is a
+registered trademark of Intel Corporation. Zilog and Z80 are registered trademarks of Zilog, Inc.
+
+\bigskip
+\bigskip
+\begin{center} \rule{3cm}{2pt} \end{center}
+
+\bigskip
+\bigskip
+\begin{it}
+This document was formatted using \LaTeX{} and produced using the MiKTeX implementation of pdfLaTeX and BibTeX.
+\end{it}
+
+\newpage
+\renewcommand{\contentsname}{Table of Contents}
+\cftpagenumbersoff{chapter}
+\tableofcontents
+\clearpage
+\listoftables
+\clearpage
+\listoffigures
+\clearpage
+
+\renewcommand*\ttdefault{pcr}
+
+%
+% Start of main document content
+%
+
+\mainmatter
+\pagestyle{fancy}
+
+\fancyhf{}
+\renewcommand{\chaptermark}[1]{ \markboth{#1}{} }
+\renewcommand{\sectionmark}[1]{ \markright{#1}{} }
+\fancyfoot{\small RetroBrew Computing Group ~~ {\xrfill[3pt]{1pt}[cyan]} ~~ \thepage}
+\renewcommand{\headrulewidth}{0pt}
+\renewcommand{\footrulewidth}{0pt}
+
+\fancypagestyle{plain}{
+ \fancyhf{}
+ \fancyfoot{\small RetroBrew Computing Group ~~ {\xrfill[3pt]{1pt}[cyan]} ~~ \thepage}
+ \renewcommand{\headrulewidth}{0pt}
+ \renewcommand{\footrulewidth}{0pt}
+}
+
+%\fancyhead{\footnotesize \bfseries \thesection ~ \rightmark \hfill RomWBW User Guide}
+\fancyhead{\small \thesection ~ \rightmark \hfill RomWBW User Guide}
+\renewcommand{\headrulewidth}{1pt}
+
+\input{Overview.ltx}
+
+\input{GettingStarted.ltx}
+
+\input{DiskUsage.ltx}
+
+\input{SystemMonitor.ltx}
+
+\input{OperatingSystems.ltx}
+
+\input{Features.ltx}
+
+\input{Customization.ltx}
+
+\input{FormatSamples.ltx}
+
+\appendix
+
+\addtocontents{toc}{ {\bigskip \bigskip \Large Appendixes \bigskip \par} }
+
+\input{BoardNotes.ltx}
+
+\input{Licensing.ltx}
+
+\backmatter
+
+\end{document}
\ No newline at end of file
diff --git a/Doc/Source/RomWBW User Guide/OperatingSystems.ltx b/Doc/Source/RomWBW User Guide/OperatingSystems.ltx
new file mode 100644
index 00000000..b0fa7ab0
--- /dev/null
+++ b/Doc/Source/RomWBW User Guide/OperatingSystems.ltx
@@ -0,0 +1,15 @@
+\chapter{Operating Systems}
+
+\blindtext
+
+\section{CP/M-80}
+
+\blindtext
+
+\section{Z-System}
+
+\blindtext
+
+\section{NZ-COM}
+
+\blindtext
diff --git a/Doc/Source/RomWBW User Guide/Overview.ltx b/Doc/Source/RomWBW User Guide/Overview.ltx
new file mode 100644
index 00000000..15012aea
--- /dev/null
+++ b/Doc/Source/RomWBW User Guide/Overview.ltx
@@ -0,0 +1,272 @@
+\chapter{Overview}
+
+RomWBW is system software that supports the Z80/Z180 based computing
+platforms produced by the RetroBrew
+Computing Group which is found at http://www.retrobrewcomputers.org. The goal of the
+project is to provide all firmware
+and software needed to make a fully functional computing platform. This
+includes both firmware (ROM) and
+software (disk images). The source code is provided and is licensed under
+GPL v3. A GitHub repository is
+used to maintain all source code and can be found at
+http://www.github.com/RomWBW.
+
+Essentially all Z80/Z180 based hardware produced by RetroBrew Computing is
+fully supported by RomWBW. Much of the software was adapted from software
+produced by others in the community (see Acknowledgements) and is packaged
+within RomWBW to provide an integrated solution. A companion document
+(RomWBW System Guide) provides substantial detail on the architecture and
+internal operation of this software.
+
+It is worth noting that this software is a perpetual work-in-progress.
+While it has become fairly stable and robust over time, it is undergoing
+constant updates to support new and revised hardware produced by the
+community. Backward compatibility between releases should not be assumed.
+In order to provide a complete solution, the RomWBW package incorporates a
+hardware BIOS (hardware drivers) and selected operating systems and
+application software. All software is derived from the CP/M era of 8-bit
+computing. The operating systems included have been adapted to run under
+the RomWBW architecture. In general, application software has simply been
+included as originally distributed by the vendors and required no adaptation.
+
+The RomWBW distribution package includes all the tools required to easily
+build the software from the source that is included in the package. The
+package includes a range of pre-built ROM and disk images. These are
+usually sufficient to get your hardware up and running simply by
+programming a ROM and optionally copying disk image(s) to a floppy disk, CF
+Card, or SD Card. If you wish to highly customize your system software, it
+is straightforward to modify the source code and build your own. At
+present, this requires Microsoft Windows XP or greater. All of the tools
+have counterparts for Linux, so building the software under Linux should be
+possible with a little effort.
+
+\section{System Requirements}
+
+RomWBW is purely a software project. It assumes you have a fully
+functional hardware platform on which to host the software. A great deal
+of information on procuring and building the appropriate hardware is found
+on the RetroBrew Computing Wiki at http://www.retrobrewcomputing.org.
+Additionally, the RetroBrew Computing Group has a very active forum found at
+http://www.retrobrewcomputing.org/forum. This forum is the ideal place to
+ask questions and get guidance for hardware and software. It is the
+primary forum for supporting RomWBW.
+
+The starting point for a hardware platform that will appropriately host
+RomWBW software is one of the following CPU boards:
+
+\begin{description}[style=multiline, leftmargin=1.25in, labelindent=0.25in, align=right]
+
+\item [SBC]
+This is the original Z80 CPU board produced by the community. It remains a
+very functional platform and is relatively easy to build. Note that v1 has
+a design deficiency that may or may not prevent the proper operation of
+RomWBW (bank switching does not always function reliably). The SBC CPU
+board features an ECB bus connector which allows it to be expanded with a
+backplane and peripheral boards.
+
+\item [Zeta]
+The Zeta is very similar to the SBC board and is generally compatible with
+it. However, the Zeta platform is optimized to be a compact, standalone
+system. In addition to the features of the SBC, it includes an onboard
+floppy disk controller and the form factor of the board allows it to be
+mounted directly to a 3.5" floppy disk for a complete computing solution.
+It optionally supports a single daughter board that provides SD Card
+storage, VGA Monitor interface, and PS/2 keyboard interface. Although it
+does not have a bus interface, Zeta is powerful, compact, and fully
+featured. The Zeta v2 primarily adds enhanced bank switching and an
+interrupt controller which is not required by RomWBW.
+
+\item [N8]
+The N8 is a very robust SBC. It is significantly larger than the SBC and
+incorporates a wide range of peripherals right on the one board (although
+it also supports expansion via ECB bus). The N8 is based on the Z180 CPU
+and incorporates interfaces for 2 serial ports, 2 parallel ports, IDE Hard
+Disk / CF Card, SD Card, sound synthesizer, video display, PS/2 keyboard
+and mouse interface, and floppy disk controller. This board is very
+powerful, but more challenging to build. It is not compatible with the
+SBC/Zeta -- it implements a different bank switching mechanism.
+
+\item [Mark IV]
+The Mark IV by John Coffman is similar to the SBC in that it shares the
+same form factor and ECB for expansion. However, it is substantially more
+powerful featuring a Z180 CPU and onboard CF Card and SD Card interfaces.
+
+\end{description}
+
+RomWBW fully supports all of the above boards as a starting point. For
+Zeta, the ParPortProp is supported as an option. The other platforms all
+support the ECB bus for adding optional peripheral support boards.
+
+In addition to the hardware listed above, RomWBW also runs well on the
+Microsoft Windows based SIMH Altair Z80 simulator which allows you to try
+all of the RomWBW features without any actual hardware. The distribution
+package contains a copy of the simulator software for MS Windows, so it is
+very easy to use it (see Getting Started).
+
+Note that RomWBW assumes specific board configuration settings. You must
+ensure that you set the jumpers/switches of each board as required by
+RomWBW (unless you modify RomWBW and produce a custom version that supports
+your specific board configurations). The standard board configuration
+settings are documented in Appendix A.
+
+Note that RomWBW assumes there is 512KB of ROM and 512KB of RAM for all
+systems. It is fine if your system has more RAM or ROM than this, but it
+is problematic if you have less. It would be very rare for a system to
+have less that these amounts, but be aware of this constraint. These
+assumptions can be modified via customization later, but the pre-built
+software must have these minimums.
+
+All of the host boards include a serial port. RomWBW will use this serial
+port for output when you start your system. By default, RomWBW uses 38,400
+baud, 8 data bits, 1 stop bit, and no parity. You will need to connect the
+primary serial port of the host board to a terminal (or PC running terminal
+emulation software) to see the system output when you start RomWBW.
+
+The use of the ECB bus signals is standardized such that any ECB add-on
+board can generally be combined with any of the ECB host boards to provide
+enhanced functionality. Appendix A provides an inventory of the boards
+supported by RomWBW along with relevant notes and required board
+configuration settings. Appendix A also includes a compatibility/support
+matrix between the host boards and the peripheral support boards.
+
+\section{Acknowledgements}
+
+First, I want to be clear that RomWBW is not the only option available for
+system software on RetroBrew Computing Z80/Z180 hardware. While many
+similar projects are no longer active, they are very useful and may contain
+functionality that has not been incorporated in RomWBW. All of the
+software projects (including RomWBW) are listed in the RetroBrew Computing
+Wiki.
+
+The UNA Project from John Coffman is the other currently active software
+project for the Z80/Z180 projects. It is far more advanced than RomWBW in
+that it can support all 4 host boards with a single ROM image and allows
+dynamic system configuration via onboard setup. It does not yet support
+the full range of hardware or video capabilities of RomWBW. Note that
+RomWBW supports an UNA "hybrid" configuration in which the UNA BIOS is
+combined with the RomWBW OS and application layers.
+
+The RetroBrew Computing Group has existed in various forms since about 2010
+(?). Many individuals have contributed to the community. The original
+founder of the community has moved on and requested anonymity going
+forward. However, his initiative is greatly appreciated. While there is
+no formal structure to the community, Andrew Bingham has taken the mantle
+of responsibility for the wiki and discussion group. This is a critical
+function and he deserves substantial credit for this effort.
+
+Earlier in the community's history, there were multiple branches of
+software development. Frequently, when a new board was produced, someone
+would create an independent code branch to support it. This started to
+lead to a very fragmented set of software that made it very difficult to
+create an integrated system with selected boards. RomWBW came about as an
+effort to create a framework that would allow arbitrary hardware to be
+easily added without creating entirely separate branches of code.
+
+RomWBW essentially became a semi-structured place to incorporate all of the
+many software efforts of the community. Initially, most of the RomWBW
+codebase was simply a "cut and paste" of the software produced by others.
+Over time, much of this software has been repeatedly revised such that it
+is no longer similar to the original, but RomWBW owes its existence to the
+contributions of many other individuals. A few of those people are listed
+below and I apologize for anyone that I may have inadvertently omitted. I
+have intentionally omitted the original founder of the community based on
+my understanding of his desire to be anonymous going forward.
+
+Douglas Goodall worked in very close collaboration with me during the first
+year of the RomWBW Project. He produced an excellent set of supporting
+utility programs and provided a great deal of design input. Regrettably,
+his utilities no longer have a caretaker and have become unusable as RomWBW
+has evolved, but their legacy continues within the current codebase. The
+source for all of these utilities is still available if anyone wants to
+take responsibility for bringing them back to current status.
+
+John Coffman has personally produced a great deal of the hardware designs
+within the community. RomWBW contains many portions of code that John
+contributed over time. Additionally, he has been instrumental in providing
+advice and guidance to me for many years now.
+
+Dan Werner has been one of the most prolific coders within the community.
+A great deal of his code was incorporated in the early RomWBW releases.
+David Giles produced some code that also provided a more integrated set of
+software for each host board. Over time, much of his code was incorporated
+in RomWBW. Likewise, Max Scane has produced code that ultimately wound up
+in RomWBW -- specifically, he contributed the CLRDIR application.
+
+It is my belief that all code incorporated into RomWBW has been done so
+with the express or implied permission of the original authors. I realize
+there have been many other individuals that have contributed to RomWBW and
+apologize for not naming all of them.
+
+\section{RomWBW Distribution Package}
+
+RomWBW is distributed as a complete package (a .zip file) that contains
+everything appropriate for the different hardware variations. In other
+words, don't look for a specific distribution for your hardware, you just
+want the current package. Within the package, you will find documentation,
+source code, build tools, and pre-built ROM and disk images.
+
+The distribution package is usually hosted at the following locations:
+
+
+\begin{itemize}
+\item {\bf RetroBrew Computing Wiki}
+
+Navigate to https://www.retrobrewcomputers.org. Then, using the navigation
+menu on the left, choose software $\rightarrow$ firmwareos
+$\rightarrow$ romwbw to reach the RomWBW
+Project Page. At the bottom of the page you will find the distribution
+files listed for download.
+
+\item {\bf GitHub}
+
+Navigate to https://github.com/wwarthen/RomWBW for the RomWBW Project
+on GitHub. Select "releases" to reach the list of distribution files.
+Note that you will see both Prereleases and Releases listed. Unless you
+specifically want to test work-in-progress, please download only a Release
+version.
+\end{itemize}
+
+The package should be named something like RomWBW-2.8-Package.zip. Using
+any standard personal computer (Windows, Linux, Mac, etc.), download and
+extract the contents of the zip file using any of the standard zip tools.
+You will see that there are several directories that are used to organize
+the contents. Don't get overwhelmed. Initially, all you really care about
+is the Output directory (and possibly the Doc directory):
+
+\begin{description}[style=multiline, leftmargin=1.25in, labelindent=0.25in, align=right]
+
+\item [Doc]
+Contains documentation files for many components of the RomWBW distribution
+including operating systems, applications, and other aspects of RomWBW
+itself. In most cases, the name of the file should identify the component
+being documented.
+
+\item[Hardware]
+Files that are specific to certain hardware components. For example, it
+has the font ROM images for the video display boards. You do not need any
+of these files for the host boards used initially. Appendix A describes
+the contents of this directory for relevant boards.
+
+\item[Images]
+Files that are used to create disk images. Since the disk images are all
+pre-built, you do not need to worry about this directory until you want to
+create custom disk images (documented later).
+
+\item[Output]
+The ROM and Disk Images that you need to get started as documented below in
+Getting Started.
+
+\item[Source]
+The source code files that are compiled or assembled to create RomWBW.
+Again, the output is pre-built, so you don't need to worry about this
+directory until you want to customize your system.
+
+\item[Tools]
+Windows-based applications that are used to build RomWBW. It also contains
+applications that you can use to copy disk images to floppy disks, CF
+Cards, SD Cards, etc. It also has the SIMH simulation software.
+
+\end{description}
+
+In most cases, you will find a ReadMe.txt file in the directory which
+describes the contents of the directory in more detail.
diff --git a/Doc/Source/RomWBW User Guide/SystemMonitor.ltx b/Doc/Source/RomWBW User Guide/SystemMonitor.ltx
new file mode 100644
index 00000000..eff0bf16
--- /dev/null
+++ b/Doc/Source/RomWBW User Guide/SystemMonitor.ltx
@@ -0,0 +1,7 @@
+\chapter{System Monitor}
+
+\blindtext
+
+\section{Monitor Commands}
+
+\blindtext
\ No newline at end of file
diff --git a/Doc/Source/RomWBW User Guide/x - Copy (8).ltx b/Doc/Source/RomWBW User Guide/x - Copy (8).ltx
new file mode 100644
index 00000000..9b8e1807
--- /dev/null
+++ b/Doc/Source/RomWBW User Guide/x - Copy (8).ltx
@@ -0,0 +1,7 @@
+\chapter{x}
+
+\blindtext
+
+\section{x}
+
+\blindtext
\ No newline at end of file
diff --git a/Doc/Source/RomWBW User Guide/x - Copy.ltx b/Doc/Source/RomWBW User Guide/x - Copy.ltx
new file mode 100644
index 00000000..9b8e1807
--- /dev/null
+++ b/Doc/Source/RomWBW User Guide/x - Copy.ltx
@@ -0,0 +1,7 @@
+\chapter{x}
+
+\blindtext
+
+\section{x}
+
+\blindtext
\ No newline at end of file
diff --git a/Doc/Source/RomWBW User Guide/x.ltx b/Doc/Source/RomWBW User Guide/x.ltx
new file mode 100644
index 00000000..9b8e1807
--- /dev/null
+++ b/Doc/Source/RomWBW User Guide/x.ltx
@@ -0,0 +1,7 @@
+\chapter{x}
+
+\blindtext
+
+\section{x}
+
+\blindtext
\ No newline at end of file
diff --git a/Doc/Source/RomWBW.dotx b/Doc/Source/RomWBW.dotx
new file mode 100644
index 00000000..9ac3c192
Binary files /dev/null and b/Doc/Source/RomWBW.dotx differ
diff --git a/Doc/Source/WBW.png b/Doc/Source/WBW.png
new file mode 100644
index 00000000..3d43ff31
Binary files /dev/null and b/Doc/Source/WBW.png differ
diff --git a/Sim.cfg b/Sim.cfg
index fc695e6e..c4b8a747 100644
--- a/Sim.cfg
+++ b/Sim.cfg
@@ -1,6 +1,7 @@
set cpu z80
;set throttle 4K
set cpu noaltairrom
+set n8vem enabled
;set n8vem enabled debug=verbose
set debug debug.log
@@ -31,6 +32,11 @@ set hdsk1 geom=T:520/N:256/S:512
set hdsk0 wrtenb
set hdsk1 wrtenb
+; enable timer interrupt, 50Hz
+d timd 20
+d timh 38
+set simh timeron
+
; start emulation
echo
go
\ No newline at end of file
diff --git a/Source/CBIOS/cbios.asm b/Source/CBIOS/cbios.asm
index f502980d..ada63204 100644
--- a/Source/CBIOS/cbios.asm
+++ b/Source/CBIOS/cbios.asm
@@ -283,8 +283,8 @@ DPBCNT .EQU ($ - DPBMAP) / 2
;__________________________________________________________________________________________________
BOOT:
; STANDARD BOOT INVOCATION
- DI
- IM 1
+ ;DI
+ ;IM 1
LD SP,STACK ; STACK FOR INITIALIZATION
;
CALL INIT ; EXECUTE COLD BOOT ROUTINE
@@ -301,11 +301,13 @@ BOOT:
REBOOT:
; REBOOT FROM ROM, REPLACES BOOT AFTER INIT
#IFDEF PLTUNA
+ DI ; NO INTERRUPTS
LD BC,$01FB ; UNA FUNC = SET BANK
LD DE,0 ; ROM BOOT BANK
CALL $FFFD ; DO IT (RST 08 NOT SAFE HERE)
#ENDIF
#IFDEF PLTWBW
+ DI ; NO INTERRUPTS
LD A,0 ; ROM BOOT BANK
CALL HB_BNKSEL ; SELECT IT INTO LOW MEMORY
#ENDIF
@@ -315,8 +317,8 @@ REBOOT:
;
;__________________________________________________________________________________________________
WBOOT:
- DI
- IM 1
+ ;DI
+ ;IM 1
;
LD SP,STACK ; STACK FOR INITIALIZATION
;
@@ -1083,7 +1085,6 @@ BLK_BLOCK:
LDIR
RET
#ELSE
- ;LD B,BF_SYSXCPY ; HBIOS FUNC: SYSTEM EXTENDED COPY
LD B,BF_SYSSETCPY ; HBIOS FUNC: SETUP BANK COPY
LD A,(BNKUSER) ; GET USER BANK
LD E,A ; E = SOURCE (USER BANK)
@@ -1092,13 +1093,9 @@ BLK_BLOCK:
LD HL,128 ; HL = COPY LEN = DMA BUFFER SIZE
RST 08 ; DO IT
CALL BLK_SETUP ; SETUP SOURCE AND DESTINATION
- ;LD B,BF_SYSCPY ; HBIOS FUNC: SYSTEM COPY
LD B,BF_SYSBNKCPY ; HBIOS FUNC: PERFORM BANK COPY
EX DE,HL ; SWAP HL/DE FOR BLOCK OPERATION
- ;PUSH IX ; SAVE IX
- ;LD IX,128 ; DMA BUFFER SIZE
RST 08 ; DO IT
- ;POP IX ; RESTORE IX
RET
#ENDIF
;
@@ -1113,18 +1110,13 @@ BLK_DEBLOCK:
LDIR
RET
#ELSE
- ;LD B,BF_SYSXCPY ; HBIOS FUNC: SYSTEM EXTENDED COPY
LD B,BF_SYSSETCPY ; HBIOS FUNC: SETUP BANK COPY
LD DE,(BNKBIOS) ; E = SOURCE (BIOS BANK), D = DEST (USER BANK)
LD HL,128 ; HL = COPY LEN = DMA BUFFER SIZE
RST 08 ; DO IT
CALL BLK_SETUP ; SETUP SOURCE AND DESTINATION
- ;LD B,BF_SYSCPY ; HBIOS FUNC: SYSTEM COPY
LD B,BF_SYSBNKCPY ; HBIOS FUNC: PERFORM BANK COPY
- ;PUSH IX ; SAVE IX
- ;LD IX,128 ; DMA BUFFER SIZE
RST 08 ; DO IT
- ;POP IX ; RESTORE IX
RET
#ENDIF
;
@@ -1809,6 +1801,8 @@ HEAPEND .EQU CBIOS_END - 64 ; TOP OF HEAP MEM, END OF CBIOS LESS 32 ENTRY STACK
.FILL 16 * 16,0 ; SKIP DPH TABLE AREA
;
INIT:
+ DI ; NO INTERRUPTS FOR NOW
+
; ADJUST BOOT VECTOR TO REBOOT ROUTINE
LD HL,REBOOT ; GET REBOOT ADDRESS
LD (CBIOS_LOC + 1),HL ; STORE IT IN FIRST ENTRY OF CBIOS JUMP TABLE
@@ -1819,50 +1813,56 @@ INIT:
LD DE,BID_USR ; SWITCH BACK TO EXEC BANK
CALL $FFFD ; DO IT (RST 08 NOT YET INSTALLED)
+ ; COPY BIOS PAGE ZERO TO USER BANK
+ LD BC,$01FB ; UNA FUNC = SET BANK
+ LD DE,BID_BIOS ; UBIOS_PAGE (SEE PAGES.INC)
+ CALL $FFFD ; DO IT (RST 08 NOT YET INSTALLED)
+ PUSH DE ; SAVE PREVIOUS BANK
+
+ LD HL,0 ; FROM ADDRESS 0 (PAGE ZERO)
+ LD DE,SECBUF ; USE SECBUF AS BOUNCE BUFFER
+ LD BC,256 ; ONE PAGE IS 256 BYTES
+ LDIR ; DO IT
+
+ LD BC,$01FB ; UNA FUNC = SET BANK
+ POP DE ; RECOVER OPERATING BANK
+ CALL $FFFD ; DO IT (RST 08 NOT YET INSTALLED)
+
+ LD HL,SECBUF ; FROM SECBUF (BUNCE BUFFER)
+ LD DE,0 ; TO PAGE ZERO OF OPERATING BANK
+ LD BC,256 ; ONE PAGE IS 256 BYTES
+ LDIR ; DO IT
+
; INSTALL UNA INVOCATION VECTOR FOR RST 08
LD A,$C3 ; JP INSTRUCTION
LD (8),A ; STORE AT 0x0008
LD HL,($FFFE) ; UNA ENTRY VECTOR
LD (9),HL ; STORE AT 0x0009
#ELSE
+ ; GET CRITICAL BANK ID'S
LD B,BF_SYSGET ; HBIOS FUNC=GET SYS INFO
LD C,BF_SYSGET_BNKINFO ; HBIOS SUBFUNC=GET BANK ASSIGNMENTS
- CALL $FFF0 ; CALL HBIOS, RST 08 NOT YET INSTALLED
+ RST 08 ; CALL HBIOS
LD A,D ; GET HBIOS BANK RETURNED IN D
LD (BNKBIOS),A ; ... AND SAVE IT
LD A,E ; GET USER BANK RETURNED IN E
LD (BNKUSER),A ; ... AND SAVE IT
- ; MAKE SURE USER BANK IS ACTIVE
- LD B,BF_SYSSETBNK ; HB FUNC: SET BANK
- LD A,(BNKUSER) ; SELECT USER BANK
- LD C,A ; PUT IN C
- CALL $FFF0 ; RST 8 IS NOT YET INSTALLED
-
- ; INSTALL HBIOS INVOCATION VECTOR FOR RST 08
- LD A,$C3 ; JP INSTRUCTION
- LD (8),A ; STORE AT 0x0008
- LD HL,($FFF1) ; HBIOS ENTRY VECTOR
- LD (9),HL ; STORE AT 0x0009
-
- ; SOFT REST HBIOS
+ ; SOFT RESET HBIOS
LD B,BF_SYSRESET ; HB FUNC: RESET
RST 08 ; DO IT
-
+
; CREATE A TEMP COPY OF THE HBIOS CONFIG BLOCK (HCB)
; FOR REFERENCE USE DURING INIT
- ;LD B,BF_SYSXCPY ; HBIOS FUNC: SYSTEM EXTENDED COPY
LD B,BF_SYSSETCPY ; HBIOS FUNC: SETUP BANK COPY
LD DE,(BNKBIOS) ; D = DEST (USER BANK), E = SOURCE (BIOS BANK)
LD HL,HCB_SIZ ; HL = COPY LEN = SIZE OF HCB
RST 08 ; DO IT
- ;LD B,BF_SYSCPY ; HBIOS FUNC: SYSTEM COPY
LD B,BF_SYSBNKCPY ; HBIOS FUNC: PERFORM BANK COPY
LD HL,HCB_LOC ; COPY FROM FIXED LOCATION IN HB BANK
LD DE,HCB ; TO TEMP LOCATION IN USR BANK
- ;LD IX,HCB_SIZ ; COPY CONTENTS OF HCB
RST 08 ; DO IT
-
+
; CAPTURE RAM DRIVE STARTING BANK
LD A,(HCB + HCB_BIDRAMD0)
LD (BNKRAMD),A
@@ -2131,6 +2131,7 @@ MD_INIT4:
; FILL FIRST 8K OF RAM DISK TRACK 1 WITH 'E5'
;
#IF (CLRRAMDISK != CLR_NEVER)
+ DI ; NO INTERRUPTS
LD BC,$01FB ; UNA FUNC = SET BANK
LD DE,BID_RAMD0 ; FIRST BANK OF RAM DISK
CALL $FFFD ; DO IT (RST 08 NOT SAFE HERE)
@@ -2176,6 +2177,7 @@ CLRRAM3:
LD BC,$01FB ; UNA FUNC = SET BANK
LD DE,BID_USR ; SWITCH BACK TO EXEC BANK
CALL $FFFD ; DO IT (RST 08 NOT SAFE HERE)
+ EI ; RESUME INTERRUPTS
#ENDIF
@@ -2185,10 +2187,9 @@ CLRRAM3:
; FILL FIRST 8K OF RAM DISK TRACK 1 WITH 'E5'
;
#IF (CLRRAMDISK != CLR_NEVER)
- LD B,BF_SYSSETBNK ; HBIOS FUNC: SET BANK
+ DI ; NO INTERRUPTS
LD A,(BNKRAMD) ; FIRST BANK OF RAM DISK
- LD C,A ; ... TO C
- CALL $FFF0 ; DO IT (RST 08 NOT SAFE)
+ CALL HB_BNKSEL ; SELECT BANK
#IF (CLRRAMDISK == CLR_AUTO)
; CHECK FIRST 32 DIRECTORY ENTRIES. IF ANY START WITH AN INVALID
@@ -2211,26 +2212,21 @@ CLRRAM1:
JR CLRRAM3 ; ALL ENTRIES VALID, BYPASS INIT
CLRRAM2:
#ENDIF
- LD B,BF_SYSSETBNK ; HBIOS FUNC: SET BANK
LD A,(BNKUSER) ; SWITCH BACK TO USER BANK
- LD C,A ; ... TO REG C
- CALL $FFF0 ; DO IT (RST 08 NOT SAFE)
+ CALL HB_BNKSEL ; SELECT BANK
CALL NEWLINE2 ; FORMATTING
LD DE,STR_INITRAMDISK ; RAM DISK INIT MESSAGE
CALL WRITESTR ; DISPLAY IT
- LD B,BF_SYSSETBNK ; HBIOS FUNC: SET BANK
LD A,(BNKRAMD) ; SWITCH BACK TO FIRST BANK
- LD C,A ; ... TO REG C
- CALL $FFF0 ; DO IT (RST 08 NOT SAFE)
+ CALL HB_BNKSEL ; SELECT BANK
LD HL,0 ; SOURCE ADR FOR FILL
LD BC,$2000 ; LENGTH OF FILL IS 8K
LD A,$E5 ; FILL VALUE
CALL FILL ; DO IT
CLRRAM3:
- LD B,BF_SYSSETBNK ; HBIOS FUNC: SET BANK
LD A,(BNKUSER) ; USR BANK (TPA)
- LD C,A ; ... TO REG C
- CALL $FFF0 ; DO IT (RST 08 NOT SAFE)
+ CALL HB_BNKSEL ; SELECT BANK
+ EI ; RESUME INTRRUPTS
#ENDIF
;
#ENDIF
diff --git a/Source/HBIOS/Config/plt_mk4.asm b/Source/HBIOS/Config/plt_mk4.asm
index 2cfb02b8..ce9a1a86 100644
--- a/Source/HBIOS/Config/plt_mk4.asm
+++ b/Source/HBIOS/Config/plt_mk4.asm
@@ -8,6 +8,7 @@
CPUOSC .EQU 18432000 ; CPU OSC FREQ
RAMSIZE .EQU 512 ; SIZE OF RAM IN KB, MUST MATCH YOUR HARDWARE!!!
DEFSERCFG .EQU SER_38400_8N1 ; DEFAULT SERIAL LINE CONFIG (SHOULD MATCH ABOVE)
+INTTYPE .EQU IT_Z180 ; INTERRUPT HANDLING TYPE (IT_NONE, IT_SIMH, IT_Z180, IT_CTC, ...)
;
CRTACT .EQU FALSE ; CRT ACTIVATION AT STARTUP
VDAEMU .EQU EMUTYP_ANSI ; DEFAULT VDA EMULATION (EMUTYP_TTY, EMUTYP_ANSI, ...)
diff --git a/Source/HBIOS/Config/plt_n8.asm b/Source/HBIOS/Config/plt_n8.asm
index 4e5b4aa1..6909c89f 100644
--- a/Source/HBIOS/Config/plt_n8.asm
+++ b/Source/HBIOS/Config/plt_n8.asm
@@ -8,6 +8,7 @@
CPUOSC .EQU 18432000 ; CPU OSC FREQ
RAMSIZE .EQU 512 ; SIZE OF RAM IN KB, MUST MATCH YOUR HARDWARE!!!
DEFSERCFG .EQU SER_38400_8N1 ; DEFAULT SERIAL LINE CONFIG (SHOULD MATCH ABOVE)
+INTTYPE .EQU IT_Z180 ; INTERRUPT HANDLING TYPE (IT_NONE, IT_SIMH, IT_Z180, IT_CTC, ...)
;
CRTACT .EQU FALSE ; CRT ACTIVATION AT STARTUP
VDAEMU .EQU EMUTYP_ANSI ; DEFAULT VDA EMULATION (EMUTYP_TTY, EMUTYP_ANSI, ...)
diff --git a/Source/HBIOS/Config/plt_sbc.asm b/Source/HBIOS/Config/plt_sbc.asm
index b69a01d6..3907c884 100644
--- a/Source/HBIOS/Config/plt_sbc.asm
+++ b/Source/HBIOS/Config/plt_sbc.asm
@@ -8,6 +8,7 @@
CPUOSC .EQU 8000000 ; CPU OSC FREQ
RAMSIZE .EQU 512 ; SIZE OF RAM IN KB, MUST MATCH YOUR HARDWARE!!!
DEFSERCFG .EQU SER_38400_8N1 ; DEFAULT SERIAL LINE CONFIG (SHOULD MATCH ABOVE)
+INTTYPE .EQU IT_NONE ; INTERRUPT HANDLING TYPE (IT_NONE, IT_SIMH, IT_Z180, IT_CTC, ...)
;
CRTACT .EQU FALSE ; CRT ACTIVATION AT STARTUP
VDAEMU .EQU EMUTYP_ANSI ; DEFAULT VDA EMULATION (EMUTYP_TTY, EMUTYP_ANSI, ...)
diff --git a/Source/HBIOS/Config/plt_zeta.asm b/Source/HBIOS/Config/plt_zeta.asm
index 9953e6b3..fd05eebd 100644
--- a/Source/HBIOS/Config/plt_zeta.asm
+++ b/Source/HBIOS/Config/plt_zeta.asm
@@ -8,6 +8,7 @@
CPUOSC .EQU 20000000 ; CPU OSC FREQ
RAMSIZE .EQU 512 ; SIZE OF RAM IN KB, MUST MATCH YOUR HARDWARE!!!
DEFSERCFG .EQU SER_38400_8N1 ; DEFAULT SERIAL LINE CONFIG (SHOULD MATCH ABOVE)
+INTTYPE .EQU IT_NONE ; INTERRUPT HANDLING TYPE (IT_NONE, IT_SIMH, IT_Z180, IT_CTC, ...)
;
CRTACT .EQU FALSE ; CRT ACTIVATION AT STARTUP
VDAEMU .EQU EMUTYP_ANSI ; DEFAULT VDA EMULATION (EMUTYP_TTY, EMUTYP_ANSI, ...)
diff --git a/Source/HBIOS/Config/plt_zeta2.asm b/Source/HBIOS/Config/plt_zeta2.asm
index 658d152e..30ac5d45 100644
--- a/Source/HBIOS/Config/plt_zeta2.asm
+++ b/Source/HBIOS/Config/plt_zeta2.asm
@@ -7,4 +7,6 @@
;
#INCLUDE "Config/plt_zeta.asm" ; USE ZETA CONFIG TO START
;
+INTTYPE .SET IT_CTC ; INTERRUPT HANDLING TYPE (IT_NONE, IT_SIMH, IT_Z180, IT_CTC, ...)
+;
FDMODE .SET FDMODE_ZETA2 ; FDMODE_DIO, FDMODE_ZETA, FDMODE_DIDE, FDMODE_N8, FDMODE_DIO3
diff --git a/Source/HBIOS/Config/sbc_simh.asm b/Source/HBIOS/Config/sbc_simh.asm
index 45da6ce4..402ab8f6 100644
--- a/Source/HBIOS/Config/sbc_simh.asm
+++ b/Source/HBIOS/Config/sbc_simh.asm
@@ -5,6 +5,8 @@
;
CPUOSC .SET 20000000 ; EMULATOR RUNS FAST...
;
+INTTYPE .SET IT_SIMH
+;
SIMRTCENABLE .SET TRUE
DSRTCENABLE .SET FALSE
;
diff --git a/Source/HBIOS/asci.asm b/Source/HBIOS/asci.asm
index b776363a..2524f288 100644
--- a/Source/HBIOS/asci.asm
+++ b/Source/HBIOS/asci.asm
@@ -428,7 +428,7 @@ ASCI_CNTLB:
;CALL TSTPT
RET NZ ; ABORT ON ERROR
PUSH HL ; HL HAS (BAUD / 75), SAVE IT
- LD HL,(HCB + HCB_CPUKHZ) ; GET CPU CLK IN KHZ
+ LD HL,(CB_CPUKHZ) ; GET CPU CLK IN KHZ
;LD HL,CPUKHZ ; CPU CLK IN KHZ
;LD HL,9216 ; *DEBUG*
diff --git a/Source/HBIOS/dsrtc.asm b/Source/HBIOS/dsrtc.asm
index 4673e773..b102b8cf 100644
--- a/Source/HBIOS/dsrtc.asm
+++ b/Source/HBIOS/dsrtc.asm
@@ -182,7 +182,7 @@ DSRTC_GETTIM:
LD HL,DSRTC_TIMBUF ; SOURCE ADR
POP DE ; DEST ADR
LD BC,6 ; LENGTH IS 6 BYTES
- CALL BNKCPY ; COPY THE CLOCK DATA
+ CALL HBX_BNKCPY ; COPY THE CLOCK DATA
;
; CLEAN UP AND RETURN
XOR A ; SIGNAL SUCCESS
@@ -207,7 +207,7 @@ DSRTC_SETTIM:
LD (HB_DSTBNK),A ; SET IT
LD DE,DSRTC_TIMBUF ; DEST ADR
LD BC,6 ; LENGTH IS 6 BYTES
- CALL BNKCPY ; COPY THE CLOCK DATA
+ CALL HBX_BNKCPY ; COPY THE CLOCK DATA
;
; WRITE TO CLOCK
LD HL,DSRTC_TIMBUF ; POINT TO TIME BUFFER
diff --git a/Source/HBIOS/hbios.asm b/Source/HBIOS/hbios.asm
index 4560e809..e7b81486 100644
--- a/Source/HBIOS/hbios.asm
+++ b/Source/HBIOS/hbios.asm
@@ -49,6 +49,7 @@
#INCLUDE "std.asm"
;
; MAKE SURE EXACTLY ONE OF ROMBOOT, APPBOOT, IMGBOOT IS DEFINED.
+;
MODCNT .EQU 0
#IFDEF ROMBOOT
MODCNT .SET MODCNT + 1
@@ -65,19 +66,28 @@ MODCNT .SET MODCNT + 1
#ENDIF
;
;
+;
+#IF (INTTYPE != IT_NONE)
+#DEFINE HB_EI EI
+#DEFINE HB_DI DI
+#ELSE
+#DEFINE HB_EI ;
+#DEFINE HB_DI ;
+#ENDIF
+;
#IFNDEF APPBOOT
;
.ORG 0
;
;==================================================================================================
-; NORMAL PAGE ZERO SETUP, RET/RETI/RETN AS APPROPRIATE
+; NORMAL PAGE ZERO SETUP, RET/RETI/RETN AS APPROPRIATE, LEAVE INTERRUPTS DISABLED
;==================================================================================================
;
.FILL (000H - $),0FFH ; RST 0
JP HB_START
.DW ROM_SIG
.FILL (008H - $),0FFH ; RST 8
- JP HB_DISPATCH
+ JP HBX_INVOKE ; INVOKE HBIOS FUNCTION
.FILL (010H - $),0FFH ; RST 10
RET
.FILL (018H - $),0FFH ; RST 18
@@ -88,7 +98,7 @@ MODCNT .SET MODCNT + 1
RET
.FILL (030H - $),0FFH ; RST 30
RET
- .FILL (038H - $),0FFH ; INT
+ .FILL (038H - $),0FFH ; RST 38 / INT
RETI
.FILL (066H - $),0FFH ; NMI
RETN
@@ -106,7 +116,7 @@ ROM_SIG:
;
NAME .DB "ROMWBW v", BIOSVER, ", ", TIMESTAMP, 0
AUTH .DB "WBW",0
-DESC .DB "ROMWBW v", BIOSVER, ", Copyright 2015, Wayne Warthen, GNU GPL v3", 0
+DESC .DB "ROMWBW v", BIOSVER, ", Copyright (C) 2015, Wayne Warthen, GNU GPL v3", 0
;
.FILL ($100 - $),$FF ; PAD REMAINDER OF PAGE ZERO
;
@@ -171,18 +181,16 @@ CB_BIDROMDN .DB BID_ROMDN
.ORG HBX_LOC ; ADJUST FOR RELOCATION
;
; MEMORY LAYOUT:
+;
; HBIOS PROXY CODE $FE00 (256 BYTES)
; INTERRUPT VECTORS $FF00 (32 BYTES, 16 ENTRIES)
-; HBIOS PROXY COPY BUFFER $FF20 (128 BYTES)
-; HBIOS PROXY PRIVATE STACK $FFA0 (64 BYTES, 32 ENTRIES)
+; INTERRUPT HANDLER STUBS $FF20 (128 BYTES)
+; HBIOS PROXY COPY BUFFER $FF80 (64 BYTES)
; HBIOS PROXY MGMT BLOCK $FFE0 (32 BYTES)
;
; DEFINITIONS
;
-HBX_CODSIZ .EQU $100 ; 256 BYTE CODE SPACE
-HBX_IVTSIZ .EQU $20 ; INT VECTOR TABLE SIZE (16 ENTRIES)
-HBX_BUFSIZ .EQU $80 ; INTERBANK COPY BUFFER
-HBX_STKSIZ .EQU $40 ; PRIVATE STACK SIZE
+HBX_BUFSIZ .EQU $40 ; INTERBANK COPY BUFFER
;
; HBIOS IDENTIFICATION DATA BLOCK
;
@@ -197,24 +205,28 @@ HBX_IDENT:
;
HBX_INVOKE:
LD (HBX_STKSAV),SP ; SAVE ORIGINAL STACK FRAME
- LD SP,HBX_STACK ; SETUP NEW STACK FRAME
-
LD A,(HB_CURBNK) ; GET CURRENT BANK
LD (HBX_INVBNK),A ; SETUP TO RESTORE AT EXIT
+ HB_DI
+ LD SP,HBX_STACK ; USE STACK FRAME IN HI MEM
LD A,BID_BIOS ; HBIOS BANK
CALL HBX_BNKSEL ; SELECT IT
+ LD SP,HB_STACK ; NOW USE FULL HBIOS STACK IN HBIOS BANK
+ HB_EI
CALL HB_DISPATCH ; CALL HBIOS FUNCTION DISPATCHER
+ HB_DI
+ LD SP,HBX_STACK ; USE STACK FRAME IN HI MEM
PUSH AF ; SAVE AF (FUNCTION RETURN)
LD A,$FF ; LOAD ORIGINAL BANK ($FF IS REPLACED AT ENTRY)
HBX_INVBNK .EQU $ - 1
CALL HBX_BNKSEL ; SELECT IT
POP AF ; RESTORE AF
-
LD SP,0 ; RESTORE ORIGINAL STACK FRAME
HBX_STKSAV .EQU $ - 2
+ HB_EI
RET ; RETURN TO CALLER
;
@@ -222,11 +234,14 @@ HBX_STKSAV .EQU $ - 2
;; SETBNK - Switch Memory Bank to Bank in A.
;; Preserve all Registers including Flags.
;; Does NOT update current bank.
+;; Interrupts should be disabled by caller
;;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
;
HBX_BNKSEL:
LD (HB_CURBNK),A ; RECORD NEW CURRENT BANK
;
+HBX_BNKSEL_INT:
+;
#IF ((PLATFORM == PLT_SBC) | (PLATFORM == PLT_ZETA))
OUT (MPCL_ROM),A ; SET ROM PAGE SELECTOR
OUT (MPCL_RAM),A ; SET RAM PAGE SELECTOR
@@ -294,6 +309,10 @@ HBX_BNKSEL1:
;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
;
HBX_BNKCPY:
+ HB_DI
+ LD (HBX_BC_SP),SP
+ LD SP,HBX_STACK
+
LD A,(HB_CURBNK) ; GET CURRENT BANK
PUSH AF ; AND SAVE TO RESTORE LATER
PUSH BC ; CUR LEN -> (SP)
@@ -316,7 +335,11 @@ HBX_BC_LAST:
POP BC ; BC := REM LEN
CALL NZ,HBX_BC_ITER ; DO FINAL CHUNK, BUT ONLY IF NOT ZERO BYTES
POP AF ; RECOVER ORIGINAL BANK
- JP HBX_BNKSEL ; SWITCH TO CURRENT BANK AND EXIT
+ CALL HBX_BNKSEL ; SWITCH TO CURRENT BANK AND EXIT
+ LD SP,$FFFF
+HBX_BC_SP .EQU $ - 2
+ HB_EI
+ RET
;
HBX_BC_ITER:
; HL = SRC ADR, DE = DEST ADR, BC = LEN
@@ -342,6 +365,7 @@ HBX_BC_ITER:
; On input A=target bank, HL=target address
;
HBX_BNKCALL:
+ HB_DI
LD (HBX_TGTBNK),A ; stuff target bank to call into code below
LD (HBX_TGTADR),HL ; stuff address to call into code below
LD A,(HB_CURBNK) ; get current bank
@@ -349,162 +373,61 @@ HBX_BNKCALL:
HBX_TGTBNK .EQU $ + 1
LD A,$FF ; load bank to call ($FF overlaid at entry)
CALL HBX_BNKSEL ; activate the new bank
+ HB_EI
+
HBX_TGTADR .EQU $ + 1
CALL $FFFF ; call routine ($FFFF is overlaid above)
+
+ HB_DI
EX (SP),HL ; save hl and get bank to restore in hl
PUSH AF ; save af
LD A,H ; bank to restore to a
CALL HBX_BNKSEL ; restore it
POP AF ; recover af
POP HL ; recover hl
+ HB_EI
RET
;
-; INTERRUPT HANDLER DISPATCHING
-;
-INT_TIMER: ; TIMER INTERRUPT HANDLER
- PUSH HL ; SAVE HL
- LD HL,HB_TIMINT ; HL := INT ADR IN BIOS
- JR HBX_INT ; GO TO ROUTING CODE
-;
-INT_BAD: ; BAD INTERRUPT HANDLER
- PUSH HL ; SAVE HL
- LD HL,HB_BADINT
- JR HBX_INT
-;
-; COMMON INTERRUPT DISPATCHING CODE
-; SETUP AND CALL HANDLER IN BIOS BANK
-;
-HBX_INT: ; COMMON INTERRUPT ROUTING CODE
-;
- ; SAVE STATE (ASSUMES HL SAVED PREVIOUSLY)
- PUSH AF ; SAVE AF
- PUSH BC ; SAVE BC
- PUSH DE ; SAVE DE
-
- ; ACTIVATE BIOS BANK
-#IF ((PLATFORM == PLT_SBC) | (PLATFORM == PLT_ZETA))
- LD A,BID_BIOS ; BIOS PAGE INDEX TO ACCUM
- OUT (MPCL_ROM),A ; SET ROM PAGE SELECTOR
- OUT (MPCL_RAM),A ; SET RAM PAGE SELECTOR
-#ENDIF
-#IF (PLATFORM == PLT_ZETA2)
- LD A,(BID_BIOS - $80 + $10) * 2 ; BIOS BID -> PAGE INDEX -> A
- OUT (MPGSEL_0),A ; BANK_0: 0K - 16K
- INC A ;
- OUT (MPGSEL_1),A ; BANK_1: 16K - 32K
-#ENDIF
-#IF (PLATFORM == PLT_N8)
- LD A,(BID_BIOS << 3) & $FF ; BIOS BID -> BBR VAL -> A
- OUT0 (Z180_BBR),A ; WRITE TO Z180 BANK BASE REG
- LD A,N8_DEFACR | $80 ; BIT 7 SET FOR RAM
- OUT0 (N8_ACR),A ; WRITE TO N8 ACR
-#ENDIF
-#IF (PLATFORM == PLT_MK4)
- LD A,(BID_BIOS << 3) & $FF | $80 ; BIOS BID -> PAGE INDEX -> A
- OUT0 (Z180_BBR),A ; WRITE TO Z180 BANK BASE REG
-#ENDIF
-
- ; SETUP INTERRUPT PROCESSING STACK IN HBIOS
- LD (HB_INTSTKSAV),SP ; SAVE STACK POINTER
- LD SP,HB_INTSTK ; SWITCH TO INTERRUPT STACK
-
- ; DO THE REAL WORK
- CALL JPHL ; CALL INTERRUPT ROUTINE
-
- ; RESTORE STACK
- LD SP,(HB_INTSTKSAV) ; RESTORE STACK
-
- ; RESTORE BANK
- LD A,(HB_CURBNK) ; GET PRE-INT BANK
-;
-#IF ((PLATFORM == PLT_SBC) | (PLATFORM == PLT_ZETA))
- OUT (MPCL_ROM),A ; SET ROM PAGE SELECTOR
- OUT (MPCL_RAM),A ; SET RAM PAGE SELECTOR
-#ENDIF
-#IF (PLATFORM == PLT_ZETA2)
- BIT 7,A ; BIT 7 SET REQUESTS RAM PAGE
- JR Z,HBX_INT1 ; NOT SET, SELECT ROM PAGE
- RES 7,A ; RAM PAGE REQUESTED: CLEAR ROM BIT
- ADD A,16 ; ADD 16 x 32K - RAM STARTS FROM 512K
-;
-HBX_INT1:
- RLCA ; TIMES 2 - GET 16K PAGE INSTEAD OF 32K
- OUT (MPGSEL_0),A ; BANK_0: 0K - 16K
- INC A ;
- OUT (MPGSEL_1),A ; BANK_1: 16K - 32K
-#ENDIF
-#IF (PLATFORM == PLT_N8)
- BIT 7,A ; TEST BIT 7 FOR RAM VS. ROM
- JR Z,HBX_INT1 ; IF NOT SET, SELECT ROM PAGE
-;
- RES 7,A ; CLEAR BIT 7 FOR RAM VS. ROM
- RLCA ; SCALE SELECTOR TO
- RLCA ; ... GO FROM Z180 4K PAGE SIZE
- RLCA ; ... TO DESIRED 32K PAGE SIZE
- OUT0 (Z180_BBR),A ; WRITE TO BANK BASE
- JR HBX_INT2 ; CONTINUE
-;
-HBX_INT1: ; SELECT ROM PAGE
- XOR A ; ZERO ACCUM
- OUT0 (Z180_BBR),A ; ZERO BANK BASE
- LD A,N8_DEFACR ; SELECT ROM BY CLEARING BIT 7
- OUT0 (N8_ACR),A ; ... IN N8 ACR REGISTER
-;
-HBX_INT2:
-#ENDIF
-#IF (PLATFORM == PLT_MK4)
- RLCA ; RAM FLAG TO CARRY AND BIT 0
- JR NC,HBX_INT1 ; IF NC, ROM, SKIP AHEAD
- XOR %00100001 ; SET BIT FOR HI 512K, CLR BIT 0
-HBX_INT1:
- RLCA ; ROTATE
- RLCA ; ... AGAIN
- OUT0 (Z180_BBR),A ; WRITE TO BANK REGISTER
-#ENDIF
-;
- ; RESTORE STATE
- POP DE ; RESTORE DE
- POP BC ; RESTORE BC
- POP AF ; RESTORE AF
- POP HL ; RESTORE HL
-
- ; DONE
- RETI ; IMPLICITLY REENABLES INTERRUPTS!
-;
; PEEK & POKE ROUTINES
; ADDRESS IN HL, BANK IN D, VALUE IN/OUT IN E, A IS TRASHED
;
HBX_PEEK:
+ HB_DI
LD A,(HB_CURBNK)
PUSH AF
LD A,D
CALL HBX_BNKSEL
LD E,(HL)
- POP AF
- JP HBX_BNKSEL
+ JR HBX_PPRET
;
HBX_POKE:
+ HB_DI
LD A,(HB_CURBNK)
PUSH AF
LD A,D
CALL HBX_BNKSEL
LD (HL),E
+;
+HBX_PPRET:
POP AF
- JP HBX_BNKSEL
+ CALL HBX_BNKSEL
+ HB_EI
+ RET
;
-; FILLER FOR UNUSED HBIOS PROXY CODE SPACE
-; PAD TO START OF INTERRUPT VECTOR TABLE
+; PRIVATE STACK AT END OF HBIOS CODE
+; OCCUPIES SPACE BEFORE IVT
;
-HBX_SLACK .EQU (HBX_LOC + HBX_CODSIZ - $)
- .ECHO "HBIOS PROXY space remaining: "
- .ECHO HBX_SLACK
+HBX_STKSIZ .EQU $FF00 - $
+ .ECHO "HBIOS STACK space: "
+ .ECHO HBX_STKSIZ
.ECHO " bytes.\n"
- .FILL HBX_SLACK,$FF
+ .FILL HBX_STKSIZ,$FF
+HBX_STACK .EQU $
;
; HBIOS INTERRUPT VECTOR TABLE (16 ENTRIES)
;
HBX_IVT:
- .DW INT_TIMER
+ .DW INT_BAD
.DW INT_BAD
.DW INT_BAD
.DW INT_BAD
@@ -521,14 +444,70 @@ HBX_IVT:
.DW INT_BAD
.DW INT_BAD
;
-; INTERBANK COPY BUFFER (128 BYTES)
+; INTERRUPT HANDLER STUBS
;
-HBX_BUF .FILL HBX_BUFSIZ,0
+; THE FOLLOWING INTERRUPT STUBS RECEIVE CONTROL FROM THE
+; INTERRUPT, SETUP A HANDLER VECTOR IN HBIOS AND THEN
+; BRANCH TO THE COMMON INTERRUPT DISPATCHER
;
-; PRIVATE STACK (64 BYTES, 32 ENTRIES)
+INT_TIMER: ; TIMER INTERRUPT HANDLER
+ PUSH HL ; SAVE HL
+ LD HL,HB_TIMINT ; HL := INT ADR IN BIOS
+ JR HBX_INT ; GO TO ROUTING CODE
;
- .FILL HBX_STKSIZ,$FF
-HBX_STACK .EQU $
+INT_BAD: ; BAD INTERRUPT HANDLER
+ PUSH HL ; SAVE HL
+ LD HL,HB_BADINT
+ JR HBX_INT
+;
+; COMMON INTERRUPT DISPATCHING CODE
+; SETUP AND CALL HANDLER IN BIOS BANK
+;
+HBX_INT: ; COMMON INTERRUPT ROUTING CODE
+;
+ ; SAVE STATE (ASSUMES HL SAVED PREVIOUSLY)
+ PUSH AF ; SAVE AF
+ PUSH BC ; SAVE BC
+ PUSH DE ; SAVE DE
+
+ LD (HBX_INT_SP),SP ; SAVE ORIGINAL STACK FRAME
+ LD SP,HBX_STACK ; USE STACK FRAME IN HI MEM
+
+ LD A,BID_BIOS ; HBIOS BANK
+ CALL HBX_BNKSEL_INT ; SELECT IT
+
+ LD SP,HB_ISTACK ; NOW USE INT STACK IN HBIOS BANK
+
+ CALL JPHL ; CALL INTERRUPT ROUTINE
+
+ LD SP,HBX_STACK ; USE STACK FRAME IN HI MEM
+
+ LD A,(HB_CURBNK) ; GET PRE-INT BANK
+ CALL HBX_BNKSEL ; SELECT IT
+
+ LD SP,$FFFF ; RESTORE ORIGINAL STACK FRAME
+HBX_INT_SP .EQU $ - 2
+
+ ; RESTORE STATE
+ POP DE ; RESTORE DE
+ POP BC ; RESTORE BC
+ POP AF ; RESTORE AF
+ POP HL ; RESTORE HL
+
+ EI ; ENABLE INTERRUPTS
+ RETI ; AND RETURN
+;
+; FILL TO START OF BOUNCE BUFFER
+;
+HBX_INTFILL .EQU (HBX_XFC - HBX_BUFSIZ - $)
+ .ECHO "HBIOS INT space remaining: "
+ .ECHO HBX_INTFILL
+ .ECHO " bytes.\n"
+ .FILL HBX_INTFILL,$FF
+;
+; INTERBANK COPY BUFFER (64 BYTES)
+;
+HBX_BUF .FILL HBX_BUFSIZ,0
;
; HBIOS PROXY MGMT BLOCK (TOP 32 BYTES)
;
@@ -558,6 +537,8 @@ HBX_STACK .EQU $
; HBIOS CORE
;==================================================================================================
;
+HB_STKSIZ .EQU $60 ; HBIOS PRIVATE STACK SIZE
+HB_ISTKSIZ .EQU $40 ; HBIOS INTERRUPT STACK SIZE
;
;==================================================================================================
; ENTRY VECTORS (JUMP TABLE)
@@ -584,6 +565,10 @@ HB_START:
XOR A
OUT0 (Z180_RCR),A
+ ; MASK OFF TIMER INTERRUPTS
+ XOR A
+ OUT0 (Z180_TCR),A
+
; SET DEFAULT CPU CLOCK MULTIPLIERS (XTAL / 2)
XOR A
OUT0 (Z180_CCR),A
@@ -656,7 +641,10 @@ HB_START:
LD HL,0
LD DE,0
LD BC,$8000
- CALL HB_BNKCPY
+ CALL HBX_BNKCPY
+;
+ ; INTERRUPTS ARE ENABLED BY BNKCPY!!!
+ DI ; RE-DISABLE INTERRUPTS
;
; TRANSITION TO HBIOS IN RAM BANK
;
@@ -670,6 +658,10 @@ HB_RAMFLAG .DB FALSE ; ASSUME FALSE, SET TO TRUE BELOW AFTER RAM TRANSITION
; EXECUTION RESUMES HERE AFTER SWITCH TO RAM BANK
;
HB_START1: ; BNKCALL ARRIVES HERE, BUT NOW RUNNING IN RAM BANK
+;
+ ; INTERRUPTS ARE ENABLED BY BNKCALL!!!
+ DI ; RE-DISABLE INTERRUTPS
+;
LD SP,HBX_LOC ; RESET STACK SINCE WE DO NOT RETURN
LD A,TRUE ; ACCUM := TRUE
LD (HB_RAMFLAG),A ; SET RAMFLAG
@@ -719,6 +711,63 @@ HB_START1: ; BNKCALL ARRIVES HERE, BUT NOW RUNNING IN RAM BANK
;
CALL NEWLINE2
PRTX(STR_BANNER)
+;
+; WE CAN HANDLE INTERRUPTS NOW (HOPEFULLY)
+;
+ HB_DI ; START OF CRITICAL SECTION
+
+#IF (INTTYPE != IT_NONE)
+;
+#IF (INTTYPE == IT_SIMH)
+;
+ ; SETUP TIMER INT VECTOR VIA INT MODE 1 IN PAGE ZERO
+ LD A,$C3 ; JP OPCODE
+ LD ($38),A ; ... AT INT VECTOR ADDRESS
+ LD HL,INT_TIMER ; ADDRESS OF TIMER INT HANDLER
+ LD ($39),HL ; ... IS TARGET OF JP
+;
+#ENDIF
+;
+#IF (INTTYPE == IT_Z180)
+;
+ ; SETUP Z180 IVT
+ LD A,HBX_IVT >> 8 ; SETUP HI BYTE OF IVT ADDRESS
+ LD I,A ; ... AND PLACE IT IN I REGISTER
+ XOR A ; SETUP LO BYTE OF IVT ADDRESS
+ OUT0 (Z180_IL),A ; ... AND PLACE IN Z180 IL REGISTER
+;
+ IM 2 ; SWITCH TO INT MODE 2
+;
+ ; MASK ALL EXTERNAL INTERRUPTS FOR NOW
+ XOR A ; INT0-2 DISABLED
+ OUT0 (Z180_ITC),A ; WRITE TO INT/TRAP CONTROL REGISTER
+;
+ ; SETUP Z180 TIMER0 INTERRUPT VECTOR IN IVT
+ LD HL,INT_TIMER
+ LD (HBX_IVT + Z180_IVTIM0),HL
+
+ ; SETUP PERIODIC TIMER INTERRUPT ON TIMER 0
+ LD HL,(CB_CPUKHZ) ; 50HZ = 18432000 / 20 / 50 / X, SO X = CPU KHZ
+ LD B,0
+ LD C,Z180_RLDR0L ; INITIALIZE TIMER 0 RELOAD REGISTER
+ OUT (C),L
+ INC C
+ OUT (C),H
+ LD C,Z180_TMDR0L ; INITIALIZE TIMER 0 DATA REGISTER
+ OUT (C),L
+ INC C
+ OUT (C),H
+ LD A,%00010001 ; ENABLE TIMER0 INT AND DOWN COUNTING
+ OUT0 (Z180_TCR),A
+;
+#ENDIF
+;
+#ENDIF
+
+ HB_EI ; END OF CRITICAL SECTION
+;
+; DISPLAY PLATFORM INFORMATION
+;
CALL NEWLINE2
PRTX(STR_PLATFORM)
PRTS(" @ $")
@@ -788,13 +837,20 @@ INITSYS3:
;
CALL PRTSUM ; PRINT UNIT/DEVICE SUMMARY TABLE
;
+;
+;
+; CALL TSTPT
+; LD HL,($FF00 + 2)
+; CALL JPHL
+; CALL TSTPT
+;
; CHAIN TO OS LOADER
;
#IFDEF ROMBOOT
; PERFORM BANK CALL TO OS IMAGES BANK
LD A,BID_OSIMG ; CHAIN TO OS IMAGES BANK
LD HL,0 ; ENTER AT ADDRESS 0
- CALL HB_BNKCALL ; GO THERE
+ CALL HBX_BNKCALL ; GO THERE
HALT ; WE SHOULD NEVER COME BACK!
#ELSE
; COPY OS IMAGE: BID_USR:
--> BID_USR:0
@@ -804,12 +860,12 @@ INITSYS3:
LD HL,HB_END
LD DE,0
LD BC,$8000
- CALL HB_BNKCPY
+ CALL HBX_BNKCPY
;
; PERFORM BANK CALL TO OS IMAGES BANK
LD A,BID_USR ; CHAIN TO OS IMAGES BANK
LD HL,0 ; ENTER AT ADDRESS 0
- CALL HB_BNKCALL ; GO THERE
+ CALL HBX_BNKCALL ; GO THERE
HALT ; WE SHOULD NEVER COME BACK!
@@ -924,11 +980,11 @@ HB_DISPATCH:
;
; CHECK STACK INTEGRITY
PUSH AF
- LD A,(HBX_STACK - HBX_STKSIZ + $08)
+ LD A,(HB_STACK - HB_STKSIZ + $08)
CP $FF
CALL NZ,PANIC
LD A,$FF
- LD (HBX_STACK - HBX_STKSIZ + $08),A
+ LD (HB_STACK - HB_STKSIZ + $08),A
POP AF
RET
HB_DISPCALL:
@@ -1473,7 +1529,7 @@ SYS_BNKCPY:
;POP AF
; *DEBUG* END
- CALL BNKCPY
+ CALL HBX_BNKCPY
XOR A
RET
;
@@ -1719,17 +1775,55 @@ CIO_IDLE:
; TIMER INTERRUPT
;
HB_TIMINT:
+ ; INCREMENT TICK COUNTER (32 BIT)
+ LD HL,HB_TICKS ; POINT TO TICK COUNTER
+ INC (HL)
+ JR NZ,HB_TIMINT1
+ INC HL
+ INC (HL)
+ JR NZ,HB_TIMINT1
+ INC HL
+ INC (HL)
+ JR NZ,HB_TIMINT1
+ INC HL
+ INC (HL)
+;
+HB_TIMINT1:
+;
+#IF 0
+;
+ LD HL,TEMPCNT
+ DEC (HL)
+ JR NZ,HB_TIMINT2
+ LD (HL),250
+;
+ LD A,'*'
+ CALL COUT
+ JR HB_TIMINT2
+;
+TEMPCNT .DB 250
+;
+#ENDIF
+;
+HB_TIMINT2:
+;
+#IF (INTTYPE == IT_Z180)
+ ; ACK/RESET INTERRUPT
+ IN0 A,(Z180_TCR)
+ IN0 A,(Z180_TMDR0L)
+#ENDIF
+;
RET
;
; BAD INTERRUPT HANDLER
;
HB_BADINT:
+ CALL NEWLINE2
+ PRTS("+++ BAD INT: $")
+ CALL _REGDMP
+ CALL CONTINUE
RET
;
-; WRAPPER FOR CALL TO HB_BNKCPY FOR USE BY INTERNAL HBIOS FUNCTIONS
-;
-BNKCPY .EQU HB_BNKCPY
-;
; ADD AN ENTRY TO THE UNIT TABLE AT ADDRESS IN HL
; C: DEVICE TYPE ID
; B: UNIT INDEX
@@ -2838,9 +2932,13 @@ HSTHEAD .DB 0 ; HEAD (0-255)
;
HEAPCURB .DW 0 ; MARK HEAP ADDRESS AFTER INITIALIZATION
;
-HB_INTSTKSAV .DW 0 ; SAVED STACK POINTER DURING INT PROCESSING
- .FILL $40,$FF ; 32 ENTRY STACK FOR INTERRUPT PROCESSING
-HB_INTSTK .EQU $ ; TOP OF INTERRUPT PROCESSING STACK
+HB_TICKS .FILL 4,0 ; 32 BIT TICK COUNTER
+;
+ .FILL HB_STKSIZ,$FF ; 48 ENTRY STACK FOR HBIOS FUNCTION PROCESSING
+HB_STACK .EQU $ ; TOP OF HBIOS STACK
+;
+ .FILL HB_ISTKSIZ,$FF ; 32 ENTRY STACK FOR INTERRUPT PROCESSING
+HB_ISTACK .EQU $ ; TOP OF INTERRUPT PROCESSING STACK
;
STR_BANNER .DB "RetroBrew HBIOS v", BIOSVER, ", ", TIMESTAMP, "$"
STR_PLATFORM .DB PLATFORM_NAME, "$"
diff --git a/Source/HBIOS/md.asm b/Source/HBIOS/md.asm
index 5a21a6a3..e459b611 100644
--- a/Source/HBIOS/md.asm
+++ b/Source/HBIOS/md.asm
@@ -190,7 +190,7 @@ MD_READ:
LD A,B ; GET DESTINATION BANK
LD (HB_DSTBNK),A ; SET IT
POP BC
- CALL BNKCPY ; DO THE INTERBANK COPY
+ CALL HBX_BNKCPY ; DO THE INTERBANK COPY
XOR A
RET
;
@@ -222,7 +222,7 @@ MD_WRITE:
LD A,B ; GET DESTINATION BANK
LD (HB_DSTBNK),A ; SET IT
POP BC
- CALL BNKCPY ; DO THE INTERBANK COPY
+ CALL HBX_BNKCPY ; DO THE INTERBANK COPY
XOR A
RET
;
diff --git a/Source/HBIOS/ppk.asm b/Source/HBIOS/ppk.asm
index e47d371a..0a9bb8b8 100644
--- a/Source/HBIOS/ppk.asm
+++ b/Source/HBIOS/ppk.asm
@@ -76,7 +76,7 @@ PPK_INIT:
CALL PRTHEXBYTE
;
; PRECOMPUTE TIMEOUT LOOP COUNT (CPU KHZ / 16)
- LD HL,(CPUKHZ) ; GET CPU SPEED IN KHZ
+ LD HL,(CB_CPUKHZ) ; GET CPU SPEED IN KHZ
LD B,4 ; SHIFT 4 TIMES TO DIVIDE BY 16
PPK_INIT1:
SRL H ; RIGHT SHIFT
diff --git a/Source/HBIOS/romldr.asm b/Source/HBIOS/romldr.asm
index 70aba11b..9d278216 100644
--- a/Source/HBIOS/romldr.asm
+++ b/Source/HBIOS/romldr.asm
@@ -23,7 +23,7 @@ ZSYSIMG .EQU $5000
#IF (PLATFORM == PLT_UNA)
JP $FFFD ; INVOKE UBIOS FUNCTION
#ELSE
- JP $FFF0 ; INVOKE HBIOS FUNCTION
+ JP HB_INVOKE ; INVOKE HBIOS FUNCTION
#ENDIF
.FILL (010H - $),0FFH ; RST 10
RET
@@ -47,8 +47,9 @@ ZSYSIMG .EQU $5000
; LOADER
;==================================================================================================
;
- DI ; NO INTERRUPTS
- IM 1 ; INTERRUPT MODE 1
+ ;DI ; NO INTERRUPTS
+ ;IM 1 ; INTERRUPT MODE 1
+;
LD SP,BL_STACK ; SETUP STACK
;
; COPY OURSELVES TO HI RAM FOR PHASE 2
@@ -74,6 +75,19 @@ PHASE2:
CALL DELAY_INIT
#ENDIF
+#IF (PLATFORM != PLT_UNA)
+ ; PREP THE USER BANK (SETUP DEFAULT PAGE ZERO)
+ LD B,BF_SYSSETCPY ; HBIOS FUNC: SETUP BANK COPY
+ LD D,BID_USR ; D = DEST BANK = USER BANK
+ LD E,BID_BIOS ; E = SRC BANK = BIOS BANK
+ LD HL,256 ; HL = COPY LEN = 1 PAGE = 256 BYTES
+ RST 08 ; DO IT
+ LD B,BF_SYSBNKCPY ; HBIOS FUNC: PERFORM BANK COPY
+ LD HL,0 ; COPY FROM BIOS ADDRESS 0
+ LD DE,0 ; TO USER ADDRESS 0
+ RST 08 ; DO IT
+#ENDIF
+
; RUN THE BOOT LOADER MENU
JP DOBOOTMENU
;
@@ -190,11 +204,13 @@ DB_INVALID:
;
GOMON:
CALL LDMON
- JP MON_SERIAL
+ LD HL,MON_SERIAL ; JUMP TO MONITOR, SERIAL ENTRY
+ JR EXECUSR
;
GOMONDSKY:
CALL LDMON
- JP MON_DSKY
+ LD HL,MON_DSKY
+ JR EXECUSR
;
LDMON:
LD DE,STR_BOOTMON
@@ -219,9 +235,6 @@ GOCPM2:
LD BC,$01FC ; UNA FUNC: SET BOOTSTRAP HISTORY
RST 08 ; CALL UNA
#ELSE
- ;LD B,BF_SYSHCBPUTW ; HB FUNC: PUT HCB WORD
- ;LD C,HCB_BOOTVOL ; BOOT VOLUME (UNIT, SLICE)
- ;LD DE,$0100
LD B,BF_SYSSET ; HB FUNC: SET HBIOS PARAMETER
LD C,BF_SYSSET_BOOTINFO ; HB SUBFUNC: SET BOOT INFO
LD A,(HB_CURBNK) ; GET CURRENT BANK ID FROM PROXY DATA
@@ -229,7 +242,8 @@ GOCPM2:
LD DE,$0100 ; BOOT VOLUME (UNIT, SLICE)
RST 08
#ENDIF
- JP CPM_ENT
+ LD HL,CPM_ENT ; CPM ENTRY VECTOR
+ JR EXECUSR
;
GOZSYS:
LD DE,STR_BOOTZSYS
@@ -237,6 +251,15 @@ GOZSYS:
LD HL,ZSYSIMG
JR GOCPM2
;
+EXECUSR:
+#IF (PLATFORM == PLT_UNA)
+ JP (HL)
+#ELSE
+ LD A,BID_USR ; WITH USER BANK ACTIVE
+ CALL HB_BNKCALL ; GO THERE
+ CALL PANIC ; WE ARE NOT SUPPOSED TO RETURN
+#ENDIF
+;
GOLIST:
LD DE,STR_LIST
CALL WRITESTR
@@ -352,7 +375,8 @@ BOOTDISK:
; JUMP TO COLD BOOT ENTRY
CALL NEWLINE ; FORMATTING
LD HL,(BB_CPMENT) ; GET THE ENTRY POINT
- JP (HL) ; ... AND GO
+ ;JP (HL) ; ... AND GO
+ JP EXECUSR ; ... AND GO
;
; PRINT LIST OF ALL DRIVES UNDER UNA
;
@@ -882,6 +906,11 @@ CIN:
;
CST:
; SAVE INCOMING REGISTERS (AF IS OUTPUT)
+ CALL DLY64
+ CALL DLY64
+ CALL DLY64
+ CALL DLY64
+ CALL DLY64
PUSH BC
PUSH DE
PUSH HL
@@ -889,6 +918,8 @@ CST:
; GET CONSOLE INPUT STATUS VIA HBIOS
LD C,CIODEV_CONSOLE ; CONSOLE UNIT TO C
LD B,BF_CIOIST ; HBIOS FUNC: INPUT STATUS
+ ;XOR A ; *DEBUG*
+ ;INC A ; *DEBUG*
RST 08 ; HBIOS RETURNS STATUS IN A
;
; RESTORE REGISTERS (AF IS OUTPUT)
diff --git a/Source/HBIOS/simrtc.asm b/Source/HBIOS/simrtc.asm
index f1ba8465..97e29987 100644
--- a/Source/HBIOS/simrtc.asm
+++ b/Source/HBIOS/simrtc.asm
@@ -71,7 +71,7 @@ SIMRTC_GETTIM:
LD HL,SIMRTC_BUF ; SOURCE ADR
POP DE ; DEST ADR
LD BC,SIMRTC_BUFSIZ ; LENGTH
- CALL BNKCPY ; COPY THE CLOCK DATA
+ CALL HBX_BNKCPY ; COPY THE CLOCK DATA
;
LD DE,60 ; DELAY 60 * 16US = ~1MS
CALL VDELAY ; SLOW DOWN SIMH FOR CLOCK TICKING TEST
@@ -101,7 +101,7 @@ SIMRTC_SETTIM:
LD (HB_DSTBNK),A ; SET IT
LD DE,SIMRTC_BUF ; DEST ADR
LD BC,SIMRTC_BUFSIZ ; LENGTH
- CALL BNKCPY ; COPY THE CLOCK DATA
+ CALL HBX_BNKCPY ; COPY THE CLOCK DATA
;
LD HL,SIMRTC_BUF ; POINT TO TEMP BUF
LD A,SIMRTC_CLKWRITE ; WRITE CLOCK COMMAND
diff --git a/Source/HBIOS/std.asm b/Source/HBIOS/std.asm
index d2721fa5..39213274 100644
--- a/Source/HBIOS/std.asm
+++ b/Source/HBIOS/std.asm
@@ -121,7 +121,7 @@ SER_PARSPACE .EQU 7 << 3
SER_STOP1 .EQU 0 << 2
SER_STOP2 .EQU 1 << 2
;
-; SEREIAL BAUD RATES ENCODED AS V = 75 * 2^X * 3^Y
+; SERIAL BAUD RATES ENCODED AS V = 75 * 2^X * 3^Y
; AND STORED AS 5 BITS: YXXXX
;
SER_BAUD300 .EQU $02 << 8
@@ -154,6 +154,13 @@ SER_115200_8N1 .EQU SER_BAUD115200 | SER_DATA8 | SER_PARNONE | SER_STOP1
SER_230400_8N1 .EQU SER_BAUD230400 | SER_DATA8 | SER_PARNONE | SER_STOP1
SER_460800_8N1 .EQU SER_BAUD460800 | SER_DATA8 | SER_PARNONE | SER_STOP1
;
+; INTERRUPT TYPE OPTIONS
+;
+IT_NONE .EQU 0
+IT_SIMH .EQU 1
+IT_Z180 .EQU 2
+IT_CTC .EQU 3
+;
#INCLUDE "build.inc" ; INCLUDE USER CONFIG, ADD VARIANT, TIMESTAMP, & ROMSIZE
;
#IF ((PLATFORM == PLT_N8) | (PLATFORM == PLT_MK4))
diff --git a/Source/HBIOS/ver.inc b/Source/HBIOS/ver.inc
index 74417084..d8e73973 100644
--- a/Source/HBIOS/ver.inc
+++ b/Source/HBIOS/ver.inc
@@ -2,4 +2,4 @@
#DEFINE RMN 8
#DEFINE RUP 0
#DEFINE RTP 0
-#DEFINE BIOSVER "2.8.0-pre.5"
+#DEFINE BIOSVER "2.8.0-pre.6"
diff --git a/Source/HBIOS/z180.inc b/Source/HBIOS/z180.inc
index 5ceb0bae..615ec065 100644
--- a/Source/HBIOS/z180.inc
+++ b/Source/HBIOS/z180.inc
@@ -65,3 +65,13 @@ Z180_CBAR .EQU Z180_BASE + $3A ; MMU COMMON/BANK AREA REGISTER
;
Z180_OMCR .EQU Z180_BASE + $3E ; OPERATION MODE CONTROL
Z180_ICR .EQU $3F ; I/O CONTROL REGISTER (NOT RELOCATED!!!)
+;
+Z180_IVINT1 .EQU 0
+Z180_IVINT2 .EQU 2
+Z180_IVTIM0 .EQU 4
+Z180_IVTIM1 .EQU 6
+Z180_IVDMA0 .EQU 8
+Z180_IVDMA1 .EQU 10
+Z180_IVCSIO .EQU 12
+Z180_IVSER0 .EQU 14
+Z180_IVSER1 .EQU 16