Compare commits

..

1 Commits

Author SHA1 Message Date
wwarthen
80d52d824c 2014-10-13 15:30:34 +00:00
2097 changed files with 47424 additions and 269554 deletions

2
.gitattributes vendored
View File

@@ -1,2 +0,0 @@
# Leave all line endings alone!
* -text

View File

@@ -1,74 +0,0 @@
name: Commit Build
on:
push:
branches:
- '**'
tags-ignore:
- '**'
jobs:
buildLinux:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3.3.0
- name: Get Commit Ref
run: |
COMMIT_REF=$(git rev-parse --short $GITHUB_SHA)
echo "COMMIT_REF: $COMMIT_REF"
echo "COMMIT_REF=$COMMIT_REF" >>$GITHUB_ENV
- name: Build
run: |
export TZ='America/Los_Angeles'
sudo apt-get install srecord
make dist
rm -rf .git*
- name: List Output
run: |
cd Binary
ls -l
find -type f -exec md5sum '{}' \;
- name: Upload Artifact
uses: actions/upload-artifact@v3.1.1
with:
name: RomWBW-${{env.COMMIT_REF}}-Linux
path: .
buildMacOS:
runs-on: macOS-latest
steps:
- name: Checkout
uses: actions/checkout@v3.3.0
- name: Get Commit Ref
run: |
COMMIT_REF=$(git rev-parse --short $GITHUB_SHA)
echo "COMMIT_REF: $COMMIT_REF"
echo "COMMIT_REF=$COMMIT_REF" >>$GITHUB_ENV
- name: Build
run: |
export TZ='America/Los_Angeles'
brew install srecord
make dist
rm -rf .git*
- name: List Output
run: |
cd Binary
ls -l
find . -type f -exec md5 -r -- '{}' +;
- name: Upload Artifact
uses: actions/upload-artifact@v3.1.1
with:
name: RomWBW-${{env.COMMIT_REF}}-MacOS
path: .

View File

@@ -1,109 +0,0 @@
name: Release Build
on:
push:
tags:
- '**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3.3.0
- name: Build
run: |
export TZ='America/Los_Angeles'
sudo apt-get install libncurses-dev
sudo apt-get install srecord
make dist
rm -rf .git*
- name: Create Package Archive
run: |
zip -r RomWBW-${{github.ref_name}}-Package.zip .
- name: Set Title
run: |
echo "Tag: ${{github.ref_name}}"
if grep -q "dev" <<< "${{github.ref_name}}"; then
TITLE="RomWBW Development Snapshot"
elif grep -q "pre" <<< "${{github.ref_name}}"; then
TITLE="RomWBW Prerelease"
elif grep -q "rc" <<< "${{github.ref_name}}"; then
TITLE="RomWBW Release Candidate"
else
TITLE="RomWBW"
fi
echo "Title: $TITLE"
echo "TITLE=$TITLE" >>$GITHUB_ENV
- name: Attach Package Archive
uses: wwarthen/actions/packages/automatic-releases@built-packages
with:
repo_token: "${{secrets.GITHUB_TOKEN}}"
draft: true
prerelease: true
title: "${{env.TITLE}} ${{github.ref_name}}"
files: |
RomWBW-${{github.ref_name}}-Package.zip
# - name: Upload Package Archive
# uses: AButler/upload-release-assets@v2.0.2
# with:
# repo-token: ${{secrets.github_token}}
# files: |
# RomWBW-${{env.PKGLBL}}-Package.zip
# - name: Post SnapShot
# uses: docker://antonyurchenko/git-release:latest
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# RELEASE_NAME_PREFIX: "${{env.TITLE}} "
# CHANGELOG_FILE: "none"
# with:
# args: |
# RomWBW-SnapShot-Package.zip
# - name: Post SnapShot
# uses: cb80/pubrel@latest
# with:
# replace: true
# files: |
# RomWBW-SnapShot-Package.zip
# - name: Post SnapShot
# uses: wwarthen/actions/packages/automatic-releases@built-packages
# with:
# repo_token: "${{ secrets.GITHUB_TOKEN }}"
# prerelease: true
# title: "RomWBW Development SnapShot ${{env.GITHUB_REF_SLUG}}"
# files: |
# RomWBW-SnapShot-Package.zip
# - name: Remove Older Releases
# uses: wwarthen/delete-release-action@v1.2
# with:
# release-drop: true
# release-keep-count: 0
# release-drop-tag: true
# pre-release-drop: false
# pre-release-keep-count: 0
# pre-release-drop-tag: true
# draft-drop: true
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - name: Remove Older Releases
# uses: s00d/delete-older-releases@0.2.1
# with:
# keep_latest: 1
## delete_tag_pattern: beta # defaults to ""
# delete_type: 'release'
# delete_branch: 'main'
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

110
.gitignore vendored
View File

@@ -1,110 +0,0 @@
# Not sure what patterns to apply
# So ignoring all generated files explicitly
**/*.[Bb][Ii][Nn]
**/*.[Cc][Oo][Mm]
**/*.[Rr][Oo][Mm]
**/*.com
**/*.eeprom
**/*.hex
**/*.img
**/*.lib
**/*.lst
**/*.o
**/*.prn
**/*.rel
**/*.sym
**/*.sys
**/*.tmp
**/*/font*.asm
Binary/**/*.mym
Binary/**/*.pt3
!Binary/cpnos-wbw.sys
Source/**/eeprom
Source/Apps/Assign.com
Source/Apps/FDU/FDU.COM
Source/Apps/Format.com
Source/Apps/IntTest.com
Source/Apps/Mode.com
Source/Apps/OSLdr.com
Source/Apps/RTC.com
Source/Apps/SysCopy.com
Source/Apps/SysGen.com
Source/Apps/Talk.com
Source/Apps/Timer.com
Source/Apps/Tune/Tune.com
Source/BPBIOS/bpsys.bak
Source/BPBIOS/bpsys.dat
Source/BPBIOS/def-ww.lib
Source/CPM3/bios3.spr
Source/CPM3/bnkbios3.spr
Source/CPM3/gencpm.dat
Source/CPM3/options.lib
Source/CPM3/zpmbios3.spr
Source/HBIOS/Blank512KB.dat
Source/HBIOS/build.inc
Source/Images/blank144
Source/Images/blankhd
Source/Prop/Spin/ParPortProp.list
Source/Prop/Spin/PropIO.list
Source/Prop/Spin/PropIO2.list
Source/Prop/ParPortProp.list
Source/Prop/PropIO.list
Source/Prop/PropIO2.list
Source/ZPM3/bnkbios3.spr
Source/ZPM3/gencpm.com
Source/ZPM3/gencpm.com
Source/ZPM3/gencpm.dat
Tools/Linux
Tools/Darwin
Tools/unix/bin2asm/bin2asm
Tools/unix/cpmtools/cpmchattr
Tools/unix/cpmtools/cpmchmod
Tools/unix/cpmtools/cpmcp
Tools/unix/cpmtools/cpmls
Tools/unix/cpmtools/cpmrm
Tools/unix/cpmtools/fsck.cpm
Tools/unix/cpmtools/fsed.cpm
Tools/unix/cpmtools/mkfs.cpm
Tools/unix/lzsa/lzsa
Tools/unix/uz80as/uz80as
Tools/unix/zx/config.h
Tools/unix/zx/zx
!Source/ver.lib
!Source/Apps/FAT/FAT.COM
!Source/Apps/ZMP/zmpx.com
!Source/Apps/ZMD/zmdsubs.rel
!Source/Apps/Test/vdctest/font.asm
!Source/BPBIOS/bpbuild.com
!Source/BPBIOS/movp112.com
!Source/BPBIOS/*.lib
!Source/BPBIOS/Z34RCP11/cledinst.com
!Source/BPBIOS/Z34RCP11/cledsave.com
!Source/Fonts/*
!Source/Images/**
!Source/RomDsk/**
!Source/UBIOS/FSFAT.BIN
!Source/UBIOS/UNA-BIOS.BIN
!Source/ZCCP/*.[Cc][Oo][Mm]
!Source/ZCPR-DJ/*.[Cc][Oo][Mm]
!Source/ZPM3/*.[Cc][Oo][Mm]
!Source/ZSDOS/*.[Cc][Oo][Mm]
!Source/ZRC/*.bin
!Source/ZZRC/*.bin
!Source/ZZRC/*.hex
!Tools/cpm/**
!Tools/unix/zx/*
!Tools/zx/*
Source/ZPM3/gencpm.com
Source/ZPM3/startzpm.com
Source/ZPM3/zccp.com
Source/ZPM3/zpmldr.com
Source/ZPM3/genbnk.dat
Source/ZSDOS/zsdos.err

View File

@@ -1,12 +0,0 @@
@echo off
setlocal
if exist *.com del *.com
if exist *.ovr del *.ovr
if exist *.doc del *.doc
if exist *.hlp del *.hlp
if exist Tunes\*.pt? del Tunes\*.pt?
if exist Tunes\*.mym del Tunes\*.mym
if exist Tunes\*.vgm del Tunes\*.vgm
pushd Test && call Clean || exit /b 1 & popd

View File

@@ -1,11 +0,0 @@
TOOLS = ../../Tools
MOREDIFF := $(shell $(TOOLS)/unix/casefn.sh *.com)
SUBDIRS = Test
include $(TOOLS)/Makefile.inc
all::
mkdir -p Tunes
clean::
@rm -f *.bin *.com *.img *.rom *.pdf *.log *.eeprom *.ovr *.hlp *.doc *.COM *.BIN Tunes/*.mym Tunes/*.pt? Tunes/*.vgm

View File

@@ -1,21 +0,0 @@
***********************************************************************
*** ***
*** R o m W B W ***
*** ***
*** Z80/Z180 System Software ***
*** ***
***********************************************************************
This directory contains the executable application files that
are specific to RomWBW. The source for these applications is found
in the Source\Apps directory of the distribution.
The Tunes subdirectory contains some sample ProTracker and MYM sound
files that can be played by the TUNE application.
All of these files are already included in the pre-built boot disk
images. They are also included on the ROM disk except for
FAT.COM, TUNE.COM, and the sample tune files in the Tunes directory.
If you upgrade your ROM to a new version, you should also copy
these files over to any hard disk images you are using.

View File

@@ -1,4 +0,0 @@
@echo off
setlocal
if exist *.com del *.com

View File

@@ -1,7 +0,0 @@
TOOLS = ../../../Tools
MOREDIFF := $(shell $(TOOLS)/unix/casefn.sh *.com)
include $(TOOLS)/Makefile.inc
clean::
@rm -f *.com

View File

@@ -1,16 +0,0 @@
***********************************************************************
*** ***
*** R o m W B W ***
*** ***
*** Z80/Z180 System Software ***
*** ***
***********************************************************************
This directory contains various hardware test application files that
are specific to RomWBW. The source for these applications is found
in the Source\Apps\Test directory of the distribution.
These files are included on the pre-built disk images in user area 2.
N.B., these files may be specific to certain hardware. They should
be used as directred by the instructions for your specific hardware.

View File

@@ -1,10 +0,0 @@
***********************************************************************
*** ***
*** R o m W B W ***
*** ***
*** Z80/Z180 System Software ***
*** ***
***********************************************************************
This directory contains some sample ProTracker and MYM sound
files that can be played by the TUNE or VGMPLAY application.

View File

@@ -1,11 +0,0 @@
@echo off
setlocal
if exist *.spr del *.spr
if exist *.com del *.com
if exist *.sys del *.sys
if exist *.pat del *.pat
if exist *.dat del *.dat
if exist *.1st del *.1st
if exist *.spr del *.spr
if exist *.pat del *.pat

View File

@@ -1,7 +0,0 @@
TOOLS = ../../Tools
MOREDIFF := $(shell $(TOOLS)/unix/casefn.sh *.spr)
include $(TOOLS)/Makefile.inc
clean::
@rm -f *.spr *.com *.sys *.dat cpm3fix.pat readme.1st

View File

@@ -1,17 +0,0 @@
***********************************************************************
*** ***
*** R o m W B W ***
*** ***
*** Z80/Z180 System Software ***
*** ***
***********************************************************************
This directory contains the CP/M 3 system files for the RomWBW CP/M 3
adaptation. All of these files are already included on the CP/M 3
boot disk images. However if you are creating a CP/M 3 boot disk
manually, you should copy all of these files to the boot disk.
These files should also be copied to any CP/M 3 boot disks on your
system when you upgrade your ROM firmware. Some of these files
*must* match the version of the RomWBW firmware you are using for
proper operation of your system.

View File

@@ -1,16 +0,0 @@
@echo off
setlocal
if exist *.bin del *.bin
if exist *.dat del *.dat
if exist *.com del *.com
if exist *.img del *.img
if exist *.rom del *.rom
if exist *.hex del *.hex
if exist *.upd del *.upd
if exist *.pdf del *.pdf
if exist *.eeprom del *.eeprom
pushd Apps && call Clean || exit /b 1 & popd
pushd CPM3 && call Clean || exit /b 1 & popd
pushd ZPM3 && call Clean || exit /b 1 & popd

View File

@@ -1,674 +0,0 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
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.
TERMS AND CONDITIONS
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.
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.
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.
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.
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.
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:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
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".
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.
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.
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.
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:
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.
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.
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.
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.
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.
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.
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:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
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
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
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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
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.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
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 <http://www.gnu.org/licenses/>.
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:
<program> Copyright (C) <year> <name of author>
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.
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
<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
<http://www.gnu.org/philosophy/why-not-lgpl.html>.

View File

@@ -1,8 +0,0 @@
TOOLS = ../Tools
MOREDIFF := $(shell $(TOOLS)/unix/casefn.sh *.img *.rom *.com *.eeprom)
SUBDIRS = Apps CPM3 ZPM3
include $(TOOLS)/Makefile.inc
clean::
@rm -f *.bin *.com *.img *.rom *.upd *.hex *.pdf *.log *.eeprom *.dat

View File

@@ -1,145 +0,0 @@
***********************************************************************
*** ***
*** R o m W B W ***
*** ***
*** Z80/Z180 System Software ***
*** ***
***********************************************************************
This directory ("Binary") is part of the RomWBW System Software
distribution archive. It contains the completed binary outputs of
the build process. As described below, these files are used to
assemble a working RetroBrew Computers system.
The files in this directory are created by the build process that is
documented in the ReadMe.txt file in the Source directory. When
released the directory is populated with the default output files.
However, the output of custom builds will be placed in this directory
as well.
If you only see a few files in this directory, then you downloaded
just the source from GitHub. To retrieve the full release download
package, go to https://github.com/wwarthen/RomWBW. On this page,
look for the text "XX releases" where XX is a number. Click on this
text to go to the releases page. On this page, you will see the
latest releases listed. For each release, you will see a package
file called something like "RomWBW-2.9.0-Package.zip". Click on the
package file for the release you want to download.
ROM Firmware Images (<plt>_<cfg>.rom)
-------------------------------------
The files with a ".rom" extension are binary images ready to program
into an appropriate PROM. These files are named with the format
<plt>_<cfg>.rom. <plt> refers to the primary platform such as Zeta,
N8, Mark IV, etc. <cfg> refers to the specific configuration. In
general, there will be a standard configuration ("std") for each
platform. So, for example, the file called MK4_std.rom is a ROM
image for the Mark IV with the standard configuration. If a custom
configuration called "custom" is created and built, a new file called
MK4_custom.rom will be added to this directory.
Documentation of the pre-built ROM Images is contained in the
RomList.txt file in this directory.
ROM Firmware Update Images (<plt>_<cfg>.upd)
-------------------------------------
The files with a ".upd" extension are binary images identical to the
.rom files, but they only have the first 128K bytes. The first 128K
is the system image without the ROM disk contents. These files can be
used to update the system image without modifying the ROM disk
contents. Refer to the RomWBW User Guide for more information.
ROM Executable Images (<plt>_<cfg>.com)
---------------------------------------
When a ROM image (".rom") is created, an executable version of the
ROM is also created. These files have the same naming convention as
the ROM Image files, but have the extension ".com". These files can
be copied to a working system and run like a normal CP/M application.
When run on the target system, they install in RAM just like they had
been loaded from ROM. This allows a new ROM build to be tested
without reprogramming the actual ROM.
WARNING: In a few cases the .com file is too big to load. If you get
a message like "Full" or "BAD LOAD" when trying to load one of the
.com files, it is too big. In these cases, you will not be able to
test the ROM prior to programming it.
VDU ROM Image (vdu.rom)
-----------------------
The VDU video board requires a dedicated onboard ROM containing the
font data. The "vdu.rom" file contains the binary data to program
onto that chip.
Disk Images (fd_*.img, hd_*.img, psys.img)
------------------------------------------
RomWBW includes a mechanism for generating floppy disk and hard disk
binary images that are ready to copy directly to a floppy, hard disk,
CF Card, or SD Card which will then be ready for use in any
RomWBW-based system.
Essentially, these files contain prepared floppy and hard disk images
with a large set of programs and related files. By copying the
contents of these files to appropriate media as described below, you
can quickly create ready-to-use media. Win32DiskImager or
RawWriteWin can be used to copy images directly to media. These
programs are included in the RomWBW Tools directory.
The fd_*.img files are floppy disk images. They are sized for 1.44MB
floppy media and can be copied to actual floppy disks using
RawWriteWin (as long as you have access to a floppy drive on your
Windows computer). The resulting floppy disks will be usable on any
RomWBW-based system with floppy drive(s).
Likewise, the hd512_*.img and hd1k_*.img files are hard disk images.
Each file is intended to be copied to the start of any type of hard
disk media (typically a CF Card or SD Card). The resulting media will
be usable on any RomWBW-based system that accepts the corresponding
media type.
NOTE: The hd512_*.img files are equivalent to the hd_*.img
files in previous distributions. The hd1k_*.img files
contained a revised file system format that increases the
maximum number of CP/M directory entries from 512 to 1024.
Refer to the ReadMe.txt in the Source/Images directory
for details.
Documentation of the pre-built disk images is contained in the
DiskList.txt file in this directory.
The contents of the floppy/hard disk images are created by
the BuildImages.cmd script in the Source directory. Additional
information on how to generate custom disk images is found in the
Source\Images ReadMe.txt file.
The psys.img file contains a full implementation of the UCSD p-System
for the Z80 running under RomWBW. This image file must be placed on
disk media by itself (not appended or concatenated with hd*.img files.
Refer to the Source/pSys/ReadMe.txt file for more information on the
p-System implementation.
Propeller ROM Images (*.eeprom)
-------------------------------
The files with and extension of ".eeprom" contain the binary images
to be programmed into the Propeller-based boards. The list below
indicates which file targets each of the Propeller board variants:
ParPortProp ParPortProp.eeprom
PropIO V1 PropIO.eeprom
PropIO V2 PropIO2.eeprom
Refer to the board documentation of the boards for more information
on how to program the EEPROMs on these boards.
Apps Directory
--------------
The Apps subdirectory contains the executable application files that
are specific to RomWBW. The source for these applications is found
in the Source\Apps directory of the distribution.

View File

@@ -1,10 +0,0 @@
@echo off
setlocal
if exist *.spr del *.spr
if exist *.com del *.com
if exist *.sys del *.sys
if exist *.pat del *.pat
if exist *.dat del *.dat
if exist *.zpm del *.zpm
if exist *.spr del *.spr

View File

@@ -1,7 +0,0 @@
TOOLS = ../../Tools
MOREDIFF := $(shell $(TOOLS)/unix/casefn.sh *.spr)
include $(TOOLS)/Makefile.inc
clean::
@rm -f *.spr *.com *.sys *.dat *.zpm

View File

@@ -1,17 +0,0 @@
***********************************************************************
*** ***
*** R o m W B W ***
*** ***
*** Z80/Z180 System Software ***
*** ***
***********************************************************************
This directory contains the ZPM3 system files for the RomWBW ZPM3
adaptation. All of these files are already included on the ZPM3
boot disk images. However if you are creating a CP/M 3 boot disk
manually, you should copy all of these files to the boot disk.
These files should also be copied to any ZPM3 boot disks on your
system when you upgrade your ROM firmware. Some of these files
*must* match the version of the RomWBW firmware you are using for
proper operation of your system.

Binary file not shown.

View File

@@ -1,6 +1,4 @@
@echo off
setlocal
pushd Source && call Build %* || exit /b & popd
if "%*" == "" pause
cd Source
call Build %*

4
BuildCommon.cmd Normal file
View File

@@ -0,0 +1,4 @@
@echo off
setlocal
cd Source
call BuildCommon %*

View File

@@ -1,128 +0,0 @@
# Contributor Covenant Code of Conduct
## Our Pledge
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.
## Our Standards
Examples of behavior that contributes to a positive environment for our
community include:
* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community
Examples of unacceptable behavior include:
* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Enforcement Responsibilities
Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.
Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.
## Scope
This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
wwarthen@gmail.com.
All complaints will be reviewed and investigated promptly and fairly.
All community leaders are obligated to respect the privacy and security of the
reporter of any incident.
## Enforcement Guidelines
Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:
### 1. Correction
**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.
**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.
### 2. Warning
**Community Impact**: A violation through a single incident or series
of actions.
**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.
### 3. Temporary Ban
**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.
**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.
### 4. Permanent Ban
**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.
**Consequence**: A permanent ban from any sort of public interaction within
the community.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).
[homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.

View File

@@ -1,5 +1,9 @@
@echo off
setlocal
pushd Binary && call Clean || exit /b 1 & popd
pushd Source && call Clean || exit /b 1 & popd
pushd Source && call Clean && popd
if exist *.img del *.img /Q
if exist debug.log del debug.log
if exist Output\*.* del Output\*.* /Q

340
Doc/Build.txt Normal file
View File

@@ -0,0 +1,340 @@
Building a Custom ROM
---------------------
At present, the build environment assumes you are running
a current version of Microsoft Windows (either 32-bit or
64-bit).
If you are using Linux, David Giles has contributed a Linux
makefile that should work for you. Please read the
LinuxBuild.txt file for more information.
All required tools are included in the distribution. You
should not need anything other than what comes as part of
Windows or as part of the distribution.
In summary, the process involves the 4 steps below:
1) Create/update configuration file
2) Update/Add/Delete any files you want incorporated in
the ROM Disk
3) Run the build script (or makefile if you prefer) and
confirm there are no errors.
4) Burn the resultant ROM image and try it.
The process is really very simple. In fact, you can
essentially skip steps 1 & 2 if you want to try simply
building one of the existing configurations.
Each of the 4 steps above is described in more detail
below.
1. Create/Update Configuration File
-----------------------------------
The settings for a build are primarily controled by
a configuration file that is included in the build
process. In order to customize your settings, you
need to modify an existing configuration file or
create your own.
If you look in the Source directory, you will see
a series of files named config_xxxx_yyyy.asm. Each of
them corresponds to one of the standard configurations
listed in the ROMList.txt file.
You have two choices. You can simply modify the existing
configuration file that is closest to your situation, or
you can copy it to a new config_xxxx_yyyy.asm file and modify
that. I recommend that you copy one to your own name so
that you will always have the unmodified standard configuration
files left in place. So, for example, you could just
copy config_ZETA_std.asm to config_ZETA_wayne.asm. You MUST
name your config file as config_xxxx_yyyy.asm. The xxxx's
must match your platform (N8VEM, ZETA, N8, S2I, or S100).
The yyyy's can be whatever you want.
The config files are simply text files with various
settings. Open your target config file with your
favorite text editor and modify the settings as desired.
Unfortunately, I have not yet documented each of the
settings in detail; that will be a separate document
provided in the future. However, there are comments
in the config file that will probably be sufficient
for the most part.
2. Update/Add/Delete ROM Disk Files
-----------------------------------
The files that are included on the ROM Disk of your
ROM are copied from a set of directories during the
build process. This allows you to have complete
flexibility over the files you want included in your
ROM.
If you look at the RomDsk directory, you will see
a variety of subdirectories. These subdirectories
contain the files that will be included in the
ROM disk. The build process will determine
which subdirectories to include files from based
on the following rules:
First, all files from either std_512 or std_1024 will
be incuded depending on on the size of the ROM you
are building. If you are building a 512KB ROM, then
all the files from std_512KB will be included. If you
are building a 1MB ROM, then all the files from std_1024KB
will be included. Essentialy, the files in std_1204KB are
a superset of the ones in std_512KB because there is more
space available for the ROM drive.
Second, all files from the directory that corresponds to
your configuration file will be included. If you build
the "ZETA_std" configuration, all files in cfg_ZETA_std will
be added. Note that these files will be in addition
to the files from the std_XXXKB directory.
If you created your own config file (like config_ZETA_wayne.asm
described above), you MUST create a subdirectory within
the RomDsk directory and populate it with the files
you want added. Normally, you would include the
files from the original standard config. So, if
you created config_ZETA_wayne.asm from config_ZETA_std.asm,
then you would create a subdirectory in RomDsk called
cfg_ZETA_wayne and copy all the files from cfg_ZETA_std to
cfg_ZETA_wayne.
3. Run the Build Process
------------------------
NOTE: The process described here is the more commonly
used build script. If you wish to use a makefile
instead, refer to the comments in the makefile in
the Source directory as an alternative to the
process described here.
The build involves running commands at the command
prompt. From a Command Prompt window, you will need
to change to the high level directory for the build.
Normally, you would be changing to the RomWBW directory
unless you renamed it.
First, you will need to build the components that are
common to all configurations. These components do not
require any configuration. To build these, use the
following commands and ensure that they complete
without error:
BuildZCPR-DJ
BuildApps2
To run the main build and be prompted for required information,
just enter "Build". You will be prompted for the information
described below and the build should run. If an error is
encountered, the build should stop and display an error
in red text.
If you immediately receive the error "the execution of
scripts is disabled on this system", then you will need to
change the PowerShell Execution-Polcy to "RemoteSigned".
To do this, you need to right-click on FixPowerShell.cmd and
choose "Run as Administrator" to make the change. If is
critical that you right-click and use "Run as Administrator"
or the change will not work (you will get an error
indicating "Access to the registry denied" if you fail to
use "Run as Administrator".
The build script will prompt you for the following information
which you will need to provide (don't worry, it is simple):
Platform:
Respond with the name of the platform that you are targeting.
It must be one of N8VEM, ZETA, N8, S2I, or S100.
Configuration:
Respond with the name of the configuration you wish to build.
A list of all available configurations is displayed for your
convenience. For example, if you are building the provided
ZETA_std configuration, just enter "std". If you have created a
custom configuration as described above, you would enter
"wayne".
ROM Size [512|1024]:
Respond with either "512" for a 512KB ROM build or "1024" for a
1MB ROM build. Only the two choices are possible at this time.
It is important that you choose a ROM size that is no larger than
the szie of the ROM you will ultimately be burning. This is
dependant on your hardware.
At this point, the build should run and you will see output related
to the assembler runs and some utility invocations. Just review
the output for any obvioius errors. Normally, all errors will
cause the build to stop immediately and display an error message
in red.
You will see some lines in the output indicating the amount of
space variouis components have taken. You should check these
to make sure you do not see any negative numbers which would
indicate that you have included too many features/drivers for
the available memory space. Here are examples of the lines
showing the space used:
DATA space remaining: 39 bytes.
BOOT LOADER space remaining: 3503 bytes.
CBIOS space remaining: 161 bytes.
DBGMON space remaining: 860 bytes.
ROMX space remaining: 8191 bytes.
BOOT LOADER space remaining: 3503 bytes.
4. Deploy the ROM
-----------------
If you look in the Output directory. You should find the following files:
<config>.rom - binary ROM image to burn to EEPROM
<config>.sys - system image that can be written to the start of a
disk to enable boot from disk functionality
<config>.com - executable version of the system image that can be
copied via xmodem to a running system to test
the build.
The actual ROM image is the file ending in .rom. It should be exactly
512KB or 1MB depending on the ROM size you chose. Simply burn the .rom
image to your ROM and install it in your hardware.
Specifying Build Options on Command Line
----------------------------------------
If you don't want to be prompted for the options to the "Build"
command, you can specify the options right on the command line.
For example:
Build ZETA std 512
In this case, you will not be prompted. This is useful if you
wish to automate your build process.
Example Build Run
-----------------
C:\Users\WWarthen\Projects\N8VEM\Build\RomWBW>Build.cmd
Platform [N8VEM|ZETA|N8|S2I|S100]: ZETA
Configurations available:
> ppp
> std
Configuration: std
ROM Size [512|1024]: 512
Building ZETA_std: 512KB ROM configuration std for Z80...
tasm -t80 -g3 ccpb03.asm cp.bin
TASM Z80 Assembler. Version 3.2 September, 2001.
Copyright (C) 2001 Squak Valley Software
tasm: pass 1 complete.
tasm: pass 2 complete.
tasm: Number of errors = 0
tasm -t80 -g3 bdosb01.asm dos.bin
TASM Z80 Assembler. Version 3.2 September, 2001.
Copyright (C) 2001 Squak Valley Software
tasm: pass 1 complete.
tasm: pass 2 complete.
tasm: Number of errors = 0
tasm -t80 -g3 syscfg.asm syscfg.bin
TASM Z80 Assembler. Version 3.2 September, 2001.
Copyright (C) 2001 Squak Valley Software
tasm: pass 1 complete.
Configuration: ZETA Z80 SBC, FLOPPY (AUTOSIZE), PPIDE (STD)
tasm: pass 2 complete.
tasm: Number of errors = 0
tasm -t80 -g3 -dBLD_SYS=SYS_CPM cbios.asm cbios.bin
TASM Z80 Assembler. Version 3.2 September, 2001.
Copyright (C) 2001 Squak Valley Software
tasm: pass 1 complete.
Configuration: ZETA Z80 SBC, FLOPPY (AUTOSIZE), PPIDE (STD)
INFOLIST occupies 18 bytes.
UTIL occupies 484 bytes.
FD_DATA occupies 340 bytes.
PPIDE_DATA occupies 1116 bytes.
CBIOS space remaining: 2092 bytes.
tasm: pass 2 complete.
tasm: Number of errors = 0
tasm -t80 -g3 dbgmon.asm dbgmon.bin
TASM Z80 Assembler. Version 3.2 September, 2001.
Copyright (C) 2001 Squak Valley Software
tasm: pass 1 complete.
Configuration: ZETA Z80 SBC, FLOPPY (AUTOSIZE), PPIDE (STD)
DBGMON space remaining: 795 bytes.
tasm: pass 2 complete.
tasm: Number of errors = 0
tasm -t80 -g3 prefix.asm prefix.bin
TASM Z80 Assembler. Version 3.2 September, 2001.
Copyright (C) 2001 Squak Valley Software
tasm: pass 1 complete.
Configuration: ZETA Z80 SBC, FLOPPY (AUTOSIZE), PPIDE (STD)
tasm: pass 2 complete.
tasm: Number of errors = 0
tasm -t80 -g3 bootrom.asm bootrom.bin
TASM Z80 Assembler. Version 3.2 September, 2001.
Copyright (C) 2001 Squak Valley Software
tasm: pass 1 complete.
Configuration: ZETA Z80 SBC, FLOPPY (AUTOSIZE), PPIDE (STD)
tasm: pass 2 complete.
tasm: Number of errors = 0
tasm -t80 -g3 bootapp.asm bootapp.bin
TASM Z80 Assembler. Version 3.2 September, 2001.
Copyright (C) 2001 Squak Valley Software
tasm: pass 1 complete.
Configuration: ZETA Z80 SBC, FLOPPY (AUTOSIZE), PPIDE (STD)
tasm: pass 2 complete.
tasm: Number of errors = 0
tasm -t80 -g3 loader.asm loader.bin
TASM Z80 Assembler. Version 3.2 September, 2001.
Copyright (C) 2001 Squak Valley Software
tasm: pass 1 complete.
Configuration: ZETA Z80 SBC, FLOPPY (AUTOSIZE), PPIDE (STD)
LOADER space remaining: 1205 bytes.
tasm: pass 2 complete.
tasm: Number of errors = 0
tasm -t80 -g3 pgzero.asm pgzero.bin
TASM Z80 Assembler. Version 3.2 September, 2001.
Copyright (C) 2001 Squak Valley Software
tasm: pass 1 complete.
tasm: pass 2 complete.
tasm: Number of errors = 0
tasm -t80 -g3 hbios.asm hbios.bin
TASM Z80 Assembler. Version 3.2 September, 2001.
Copyright (C) 2001 Squak Valley Software
tasm: pass 1 complete.
Configuration: ZETA Z80 SBC, FLOPPY (AUTOSIZE), PPIDE (STD)
UART occupies 146 bytes.
FD occupies 2071 bytes.
PPIDE occupies 809 bytes.
HBIOS space remaining: 24428 bytes.
STACK space remaining: 145 bytes.
tasm: pass 2 complete.
tasm: Number of errors = 0
tasm -t80 -g3 hbfill.asm hbfill.bin
TASM Z80 Assembler. Version 3.2 September, 2001.
Copyright (C) 2001 Squak Valley Software
tasm: pass 1 complete.
Configuration: ZETA Z80 SBC, FLOPPY (AUTOSIZE), PPIDE (STD)
tasm: pass 2 complete.
tasm: Number of errors = 0
tasm -t80 -g3 romfill.asm romfill.bin
TASM Z80 Assembler. Version 3.2 September, 2001.
Copyright (C) 2001 Squak Valley Software
tasm: pass 1 complete.
tasm: pass 2 complete.
tasm: Number of errors = 0
Building ZETA_std output files...
Building 512KB ZETA_std ROM disk data file...
C:\Users\WWarthen\Projects\N8VEM\Build\RomWBW>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -1,278 +1,3 @@
Version 3.2
-----------
- WBW: Version bump for release
Version 3.1.1
-------------
- WBW: Version bumped due to pervasive changes
- WBW: Preliminary hard disk partition support (backward compatible)
- WBW: Change Propeller VGA signal timings to 60Hz refresh
- WBW: Enhanced SYSTEM RESET function to allow a warm start back to boot loader
- C?O: Add DUART driver
- WBW: Early Z280 support (requires 512K RAM/ROM board)
- HCS: ZRC memory manager support
- S?K: Support for Tiny Z80 by Sergey
- E?B: Support for v6 YM/AY sound card
- C?M: Support for RCBus bus PropIO V2
- W?S: Updated FLASH software to v1.3.4
- PMS: Preliminary support for writing to FLASH ROMs
- PMS: Creation of process to update ROM system area w/o updating ROM disk contents
- PMS: Added "updater.asm" which allows uploading and updating ROM in one step
- WBW: Support for Z280 w/ native memory and interrupt mode 3
- WBW: Support for Z280 UART (interrupt driven only in interrupt mode 3)
- WBW: Add support Z80-512K (watchdog and LED)
- WBW: Add support for ZZ80MB address map
- PLS: Add support for Z180 invalid opcode trap
- WBW: Add support for ZZRCC
- WBW: Allow selection of RAM/ROM disk individually in build
- WBW: Support 256KB ROM size
- WBW: CP/M 3 RTC support is now complete (reads and writes RTC date/time)
- WBW: Add config to allow swapping logical order of MT011 SPI ports
- WBW: COPY.COM updated from v1.72 -> v1.73 throughout distribution
- D?M: CP/NET for CP/M 2.2 and CP/M 3 (requires MT011)
- D?M: SD driver fixes for MT011
- J?C: Added FIND application from Jay Cotton
- PMS: Preliminary support for I2C-based DS1307 clock
- WBW: FD driver auto hardware detect (thanks Alan Cox)
- D?N: Added support for TMS V9958 VDU
- D?N: Added support for MSX keyboard
- D?N: Added support for RP5C01 RTC
- L?N: Slightly enhanced ZCPRD&J w/ a couple bug fixes
- L?N: UNZIPZ4 which handles most modern ZIP file compression algorithms
- AJL: Preliminary support for MBC systems
- WBW: Added preliminary support for DSKYng
- WBW: Elevated MBC to a platform
- WBW: Added support for MBC user LEDs
- PMS: Early DMA support
- W?S: Updated FLASH software to v1.3.5 (supports 128KB A29010B, 512KB A29040B)
- DDW: Support for DSKYng capabitlities
- WBW: Added Phil Summers' ROM Updater into ROM Loader
- AJL: Added ramtest app (requires SBC and MBC for now)
- L?N: Provided SCOPY, XSUB01, and EX applications
- WBW: Added support for MBC FDC to FDU application
- WBW: Added support for MBC FDC to HBIOS
- WBW: Refactored make process
- WBW: Added ROM verification to boot process
- WBW: Added Z80 instruction test apps to user area 5 in CP/M & ZSDOS
- WBW: Add support for LINC sound card
- WBW: Add interrupt receive support to UART driver
- PMS: Add XModem transfer within Debug Monitor
- PMS & AJL: Add DMAMON test application
- PMS: Add ZMP adaptation
- LWN: Substantial BPBIOS cleanup
- AJL: Add ZMD adaptation
- D?T: Substantial update to TastyBasic incuding a .COM executable
- PMS: Added VGM audio file player
- WBW: ZPMLDR and ZPM3 fixes, credit to Lars Nelson for finding ZPM3 source!
- DDW: Add support for MBC sound card
- WBW: Add support for "romless" booting
- L?N: Fixes for ZCPR-D&J (buffer overflow, default drive/user)
- J?P: Add support for DS1501 RTC
- LLS: Added a user defined mode for SD Card interfaces (not complete)
- L?N: Updated ZDE to v1.8 including time stamp preservation fixes
- D?M: Minor update to CP/NET client files, fix to CPNBOOT
- WBW: Added p-System IV.0 Z80 implementation
- WBW: Hacked SURVEY to work around bank switching crash
Version 3.1
-----------
- WBW: Refactored ROM Loader
- WBW: INTRTC periodic timer based clock
- WBW: FDISK80 updated to allow reserving up to 256 slices
- WBW: Added support dual 16C550 UART on RCBus platform
- WBW: Made .com images smaller (contain only Z-System now)
- WBW: Support automatic clock hardware detection and fallback
- WBW: Support use of CTC for SIO baud rate divisors
- WBW: Updated IDE and PPIDE drivers to improve old CF Card compatibility
- WBW: Support TIMER mode in CTC driver
- DEN: Added sound driver support
- DEN: Added SN76489 sound chip driver
- M?O: RomWBW Disk Catalog document
- DEN: Updated TMS to optionally trigger SYSTIMER interrupt (TMSTIMENABLE)
- J?M: Updated KERMIT applications with VT100 terminal support
- A?C: Added support for EPFDC
- PMS: Added AY driver with new sound API support
- DEN: Allow immediate autoboot startup
- DEN: Support for floppy device count parameter
Version 3.0.1
-------------
- WBW: Increase XModem timeout waiting for host to start sending
- WBW: Update TMS driver to dynamically increase Z180 I/O W/S inside driver
- MJS: Update CLRDIR for CP/M 3 compatibility
- WBW: Corrected cursor on/off esc sequence in pre-configured ZDE
- WBW: Fix automatic CRT console switching under CP/M 3 and ZPM3
- WBW: DSRTC driver now correctly returns an error if there is no RTC present
Version 3.0.0
-------------
- WBW: v2.9.2 -> 3.0 version upgrade due to scope of changes
Version 2.9.2
-------------
- PMS: Fixed DS1210-related issue resulting in "Invalid BIOS" errors
- SCC: Support for SC126 motherboard
- WBW: Enable Auto-CTS/DCD in SIO driver for pacing output data
- WBW: Support missing pull-up resistors on SPI SD adapter boards (common)
- WBW: Support two SIO modules w/ auto-detection
- PMS: Support ECB USB-FIFO board
- WBW: Fixed ASSIGN issue with incorrect DPB selection
- WBW: Add RCBus Z180 AY sound support to TUNE app
- WBW: Add RCBus AY sound support to AY driver
- WBW: Add SC126 platform
- WBW: Config files cleanup
- WBW: Add interrupt support to ASCI driver
- WBW: Refactored XModem overlay, merged USB-FIFO support
- PMS: Added DS1210 low battery detection/message
- PMS: Added note playing ability to SPK driver
- WBW: Support disk I/O to any memory bank
- WBW: Fix floppy I/O error on slow CPUs w/ ints active (credit Jorge Rodrigues)
- WBW: Support for KIO chip (based on board by Tom Szolyga)
- N?B: Made ZCAL Y2K compliant
- WBW: Show disk activity on diagnostic LEDs
- WBW: DSRTC now detects DS-1302 presence dynamically
- WBW: SC126 platform renamed to SCZ180 w/ configs for SC126, SC130
- WBW: Add status LED support
- WBW: Add support for secondry SPI (SD Card) on SC126
- PMS: Add sound support to NASCOM BASIC
- WBW: Updated FAT to add MD and FORMAT commands
- WBW: Add CP/M 3 (experimental)
- M?T: Support Shift register SPI WIZNET for RCBus
- PLS: Added seconds register in HBIOS
- WBW: More flexible table-driven config in TUNE.COM
- PMS: Added timer support for Zilog Peripherals ECB Board
- PLS: Enhanced Intel Hex Load in dbgmon
- WBW: Overhaul disk image creation
- WBW: Added support for Dyno platform (based on work by Steve Garcia)
- SLG: Added support for BQ4845 RTC (bqrtc.asm)
- PMS: Added 80x30 video mode to VGA3 driver
- PMS: Added 80x43 video mode
- PMS: Added font compression option
- PMS: Added a "safe mode" startup w/ minimal device support
- WBW: Switch RC/SC Z180 platforms to 115,200 default baud rate
- PMS: Enhanced PPIDE driver to handle multiple PPI interfaces
- PMS: Added a ROM based game
- WBW: Only assign drive letters to hard disk devices with media
- WBW: Enhanced IDE driver to handle multiple IDE interfaces
- D?R: Contributed SC126 How-To: Preparing a MicroSD Card to Transfer Files to/from a Linux System
- PMS: Updated romldr to handle more than 9 drives
- PMS: Added "user" rom module template
- PMS: Added CP/M 3 manuals
- WBW: Boot from any slice
- C?M: Added Unix build process
- PLS: FreeRTOS compatibility
- WWB: Removed OSLDR application (can't handle new OSes)
Version 2.9.1
-------------
- E?B: Added support for RCBus RTC
- WBW: Converted PTXPLAY to TUNE (now plays PT2/PT3/MYM sounds files)
- WBW: Updated Win32DiskImager to v1.0
- WBW: Implemented character attributes on Propeller based consoles
- MS: Added support for BEL function in Propeller based consoles
- WBW: Support additional escape sequences in Propeller console ANSI emulation
- WBW: Map LPT: to second serial port, UL1: to third serial port
- WBW: Update default IOBYTE so that LST:=LPT: by default
- WBW: Fixed missing drive/head setup for writes in PPIDE
- WBW: Fixed XModem HBIOS console driver for file send operations
- WBW: Preliminary support for RC180 platform (Z180 module in RCBus)
- WBW: Added NZCOM distribution files to third slice of hard disk image
- WBW: Fixed getnum32 bug in MODE command (found by Phil Summers)
- PMS: Added serial support for Zilog Peripherals Baord
- WBW: Added preliminary support for interrupt management API
- PMS: Improved boot messages in RAM-Floppy driver
- PMS: Added charge setting display to RTC boot messages
- WBW: Add SmallZ80 support to FDU
- WBW: Refactored Debug Monitor w/ improved syntax parsing and help
- PMS: Added Forth, Nascom BASIC, and Tasty BASIC to ROM
- PMS: Refactored ROM Loader to support more ROM images, now table driven
- WBW: Refactored DSKY code
- S?K: Initial support for Easy Z80
- PMS: Enhance VDU driver to support alternative screen dimensions
- WBW: DDT and DDTZ modified to use RST 30 instead of RST 38 to avoid conflicts with IM 1 interrupts
- WBW: Added timer interrupt support for CTC under Zeta 2 and Easy Z80
- WBW: Support LBA style access in floppy driver
- WBW: Added beta version of FAT filesystem utility (copy, dir, del, ren)
- SCC: Added support for native memory addressing on Z180-based RCBus
- PMS: Dynamically discover and display processor type at boot
- J?L: Added German keyboard support to PPK and KBD drivers
Version 2.9.0
-------------
- WBW: Implemented multi-sector I/O in all disk drivers
- WBW: Added support for RCBus SMB Floppy controller modules (SMC and WDC)
- WBW: New function dispatching for character/disk/video drivers
- WBW: Updated FDU app to support RCBus floppy controllers
- WBW: Added TIMER app to display system timer value
- WBW: Refactored interrupt management code
- WBW: Added PTXPLAY application and sample tunes
Version 2.8.6
-------------
- WBW: Added support for RCBus (SIO and ACIA drivers primarily)
- WBW: Automatically detect and run PROFILE.SUB on boot drive if it exists
- WBW: Fixed Dual SD Board detection
- WBW: Added console support to XModem (for RCBus primarily)
- E?B: Fixed IDE/PPIDE when used with non-CF drives
- WBW: Patched SUBMIT.COM so that it always puts temp file on A: for immediate execution
- WBW: Accommodate spin up time for true IDE hard disks (IDE or PPIDE)
Version 2.8.5
-------------
- WBW: Cleaned up support in TMS driver for SCG board
Version 2.8.4
-------------
- WBW: FD.COM renamed to FDU.COM and integrated with build
- WBW: FDU.COM enhanced to select FDC hardare at startup to
eliminate multiple versions.
Version 2.8.3
-------------
- WBW: Added MODE command
- WBW: Removed obsolete 1200.COM, 9600.COM, and 38400.COM
- WBW: New XM.COM that automatically adapts to primary port of platform
- WBW: XM.COM now handles 38400 baud at 4MHz
- WBW: Removed obsolete XM versions: XM5.COM, XM-A0.COM, XM-A1.COM
Version 2.8.2
-------------
- WBW: Adjusted VGA3 register setup per John's recommendations
Version 2.8.1
-------------
- WBW: Fix FDISK80
- WBW: Upgrade to latest production UNA 2.1-45
Version 2.8.0
-------------
- WBW: Add support for VGA3 board
Version 2.7.1
-------------
- WBW: Replace ZX with XP compatible build (no functional changes)
- WBW: Reset BDOS serial number on warm start
- WBW: Turn off DRAM refresh on Z180 (fixes Z180 CPU speed detection)
Version 2.7.0
-------------
- WBW: Memory page reorganization
- WBW: Support for Zeta 2 (from Sergey Kiselev)
- WBW: Support loading from image file (UNA FSFAT)
- WBW: Dynamic CPU speed detection
Version 2.6.5
-------------
- WBW: Yet more DS1302 clock driver delay mods
Version 2.6.4
-------------
- WBW: Yet more DS1302 clock driver delay mods
Version 2.6.3
-------------
- WBW: DS1302 clock driver modified to observe proper delays
Version 2.6.2
-------------
- WBW: ASSIGN.COM substantially improved to map all drive types
@@ -365,7 +90,7 @@ Version 2.0
- DWG: Entire new suite of Apps written in Aztec C
- DWG: BANKER.COM - displays bank identification and version information
- DWG: CPMNAME.COM - displays CBIOS header data and SYSCFG data, names and vaues
- DWG: CHARS.COM - displays ascii map as reference
- DWG: CHARS.COM - displays ascii map as reference
- DWG: CLS.COM - clears screen
- DWG: LABEL.COM - displays and changes drive labels for drives with reserved tracks
- DWG: MAP.COM - like old map command, displays drives and logical unit labels and changes LU values
@@ -397,7 +122,7 @@ Version 1.5.1
- WBW: Added ZSDOS clock drivers (see Support\Clock)
- WBW: Overhaul of ZSystem ROM Disk (see Doc\ZSystem.txt)
- WBW: Update PropIO ANSI emulation for compatiblity with ASSIGN
- DWG: Added version tags to all applications, and IDENT program to
- DWG: Added version tags to all applications, and IDENT program to
check version of utilities.
- DWG: Added MULTIFMT program which prepares new media for use by
initializing the metadata and clearing the directory sectors of
@@ -407,8 +132,8 @@ Version 1.5.1
- DWG: ANALYSE and HELLO programs removed from ROM due space concerns
- DWG: Additional macro librarties added supporting program identification
(IDENTITY.LIB/ASM) and access to drive metadata (METADATA.LIB/ASM),
and realtime selection of logical units from within new application
programs (LOGICALS.LIB/ASM).
and realtime selection of logical units from within new application
programs (LOGICALS.LIB/ASM).
- DWG: Added TERM_VT52 for VDU compatbility, all apps now compliant
- DGG: Contributed Linux build (see Doc\BuildLinux.txt)
@@ -436,7 +161,7 @@ Version 1.4
- DWG: Add various .SUB files used for application maintenance
- DWG: Enhanced utility building .SUB files to only contain libs utilitized
- DWG: Add BUILD.SUB to build all applications and DEVFILES.LBR
- DWG: Add/update RMAC macro libraries used in Apps -
- DWG: Add/update RMAC macro libraries used in Apps -
- DWG: BIOSHDR, STDLIB, STRCPY, STRLEN, CPMBIOS, CPMBDOS, TERMINAL, HARDWARE,
- DWG: CPMAPPL, GLOBALS, ATOI, LUBIND, APPLVERS, MEMORY(memcpy,memset), PORTAB
- DWG: Add/Repair BIOS support for Boot Drive login during CP/M Coldstart
@@ -455,7 +180,7 @@ Version 1.4
- DWG: Add LABEL utility to insert label into drive/slice metadata
- DWG: Add 16 char label field to metadata
- DWG: ASSIGN utility displays and manipulates DPH/DPB & logical unit parameters
- DWG/WBW: Collaborated on design of Logical Unit DPH enhancemnt
- DWG/WBW: Collaborated on design of Logical Unit DPH enhancemnt
- WBW: Proposed MAP utility functionality
- WBW: Implement slice selection API for DSK devices
- WBW: Record boot drive in config memory at load time

Binary file not shown.

View File

@@ -1,39 +0,0 @@
PPI Signal PPIDE PPISD DSKY DSKYNG (PROTO) DSKYNG (FINAL)
---------- ----- ----- ----- ----- -----
PA0 <>D0 >ID0 <>D0 <>D0
PA1 <>D1 >ID1 <>D1 <>D1
PA2 <>D2 >ID2 <>D2 <>D2
PA3 <>D3 >ID3 <>D3 <>D3
PA4 <>D4 >ID4 /SHUTDOWN <>D4 <>D4
PA5 <>D5 >ID5 /DECODE <>D5 <>D5
PA6 <>D6 >ID6 HEXA/CODEB <>D6 <>D6
PA7 <>D7 >ID7 DAT_COMING <>D7 <>D7
PB0 <>D8 +<ROW5
PB1 <>D9 +<ROW4
PB2 <>D10 +<ROW3
PB3 <>D11 +<ROW2
PB4 <>D12 +<ROW1
PB5 <>D13 +<ROW0
PB6 <>D14 +
PB7 <>D15 <MISO +
PC0 >DA0 >MOSI >COL0 >A0 >A0
PC1 >DA1 >CLK >COL1 >/WR
PC2 >DA2 >COL2 >/RD
PC3 >CS0* >COL3 >CS&* >CS&*
PC4 >CS1* >/CS >CS&* >CS&*
PC5 >DIOW* >/WR
PC6 >DIOR* >/WR >/RD
PC7 >RESET* >MODE >RESET >RESET
* Inverted by adapter
+ Pullup
& Both signals must be asserted
Compatibility:
- PPISD & DSKY
- PPIDE & DSKYNG
- PPISD & DSKYNG

Binary file not shown.

429
Doc/FdTst.txt Normal file
View File

@@ -0,0 +1,429 @@
================================================================
FDTST v3.1 for N8VEM DISKIO / DISKIO V3 / ZETA / DIDE / N8
================================================================
Updated JuLY 1, 2012
by Wayne Warthen (wwarthen@gmail.com)
Application to test the hardware functionality of the Floppy Disk
Controller (FDC) on the ECB DISK I/O, DISK I/O V3, ZETA SBC,
Dual IDE w/ Floppy, or N8 board.
The intent is to provide a testbed that allows direct testing
of all possible media types and modes of access. The application
supports read, write, and format by sector, track, and disk as
well as a random read/write test.
The application supports access modes of polling, interrupt,
INT/WAIT, and DRQ/WAIT. At present, it supports 3.5" media at DD (720KB) and
HD (1.44MB) capacities. It also now supports 5.25" media (720KB and 1.2MB)
and 8" media (1.11MB) as well. Additonal media will be added when I have
time and access to required hardware. Not all modes are supported
on all platforms and some modes are experimental in all cases.
In many ways this application is merely reinventing the wheel and
performs functionality similer to existing applications, but I have
not seen any other applications for DISK I/O that provide this range
of functionality.
While the application is now almost entirely new code, I would like to
acknowledge that much was derived from the previous work of Andrew Lynch
and Dan Werner. I also want to credit Sergio Gimenez with testing the 5.25"
drive support and Jim Harre with testing the 8" drive support. Thanks!
General Usage
-------------
In general, usage is self explanatory. The main menu allows you to set
the unit, media, and mode to test. These settings MUST match your
situation. Read, write, format, and verify functions are provided. A sub-menu
will allow you to choose sector, track, disk, or random tests.
The verify function requires a little explanation. It will take the contents
of the buffer, save it, and compare it to the selected sectors. So, you
must ensure that the sectors to be verified already have been written
with the same pattern as the buffer contains. I typically init the buffer
to a pattern, write the pattern to the entire disk, then verify the entire
disk.
Another submenu is provided for FDC commands. This sub-menu allows you to
send low-level commands directly to FDC. You MUST know what you are doing
to use this sub-menu. For example, in order to read a sector using this
sub-menu, you will need to perform specify, seek, sense int, and read
commands specifying correct values (nothing is value checked in this menu).
Required Hardware/BIOS
----------------------
Of course, the starting point is one of the support hardware platforms.
You need to start with either an N8VEM SBC, backplane, and ECB DISK I/O
card or a Zeta SBC. Additionally, a floppy drive connected via an
appropriate cable:
DISKIO - no twist in cable, drive unit 0/1 must be selected by jumper on drive
ZETA - cable with twist, unit 0 after twist, unit 1 before twist
DIDE/N8 - cable with twist, unit 0 before twist, unit 1 after twist
It is preferable that the BIOS you use does not have DISK I/O support
enabled since the application assumes it has complete control of the
DISK I/O hardware.
The DISK I/O should be jumpered as follows:
J1: depends on use of interrupt modes (see interrupt modes below)
J2: pins 1-2, & 3-4 jumpered
J3: hardware dependent timing for DMA mode (see DMA modes below)
J4: pins 2-3 jumpered
J5: off
J6: pins 2-3 jumpered
J7: pins 2-3 jumpered
J8: off
J9: off
J10: off
J11: off
J12: off
Note that J1 can be left on even when not using interrupt modes. As
long as the BIOS is OK with it, that is fine. Note also that J3 is
only relevant for DMA modes, but also can be left in place when
using other modes.
The DISK I/O V3 should be jumpered at the default settings:
JP2: 3-4
JP3: 1-2 for int mode support, otherwise no jumper
JP4: 1-2, 3-4
JP5: 1-2
JP6: 1-2
JP7: 1-2, 3-4
Zeta does not have any relevant jumper settings.
DIDE should be jumpered as follows:
K3 (DT/R or /RD): /RD
P5 (bd ID): 1-2, 3-4 (for $20-$3F port range)
There are no specific N8 jumper settings, but the default
I/O range starting at $80 is assumed in the published code.
Modes of Operation
------------------
You can select the following test modes. Please refer to the chart
that follows to determine which modes should work with combinations
of Z80 CPU speed and media format.
Polling: Traditional polled input/output. Works well and very reliable
including timeouts and good error recovery. Also, the slowest performance
which precludes it from being used with 1.44MB floppy on a 4MHz Z80.
This is definitely the mode you want to get working before any others.
It does not require J1 (interrupt enable) on DISK I/O and does not care about
the setting of J3.
Interrupt: Input/output is interrupt driven. Works pretty well, but
is not able to recover from some errors. For example, if there is
no disk in the drive, this mode will just hang until a disk is inserted.
This mode REQUIRES that interrupts be enabled on the DISK I/O via
jumper at J1. On Zeta it requires the INT/NMI jumper be set for
INT. Mode not supported on DIDE or N8. Some BIOS variants will not
handle interrupts during boot.
Fast Interrupt: As above, but sacrifices additional reliability for
faster operation. This mode will allow a 1.44MB floppy to work
with a 4MHz Z80 CPU. However, if any errors occur (even a transient
read error which is not unusual), this mode will hang. As above
you MUST have the appropriate jumpers for DISKIO and Zeta. DIDE
does not support this mode.
INT/WAIT: Same as Fast Interrupt, but uses CPU wait instead of
actual interrupt. Subject to all the same issues as Fast
Interrupt, but does not need J1 shorted. J3 is irrelevant.
This mode is available on only on DISKIO (and not DISKIO V3).
DRQ/WAIT: Uses pseudo DMA to handle input/output. Does not require that
interrupts (J1) be enabled on the DISK I/O. However, it is subject to
all of the same reliability issues as "Fast Interrupt". This
mode is known to not work on N8VEM DISKIO!!! It is included
for testing only. It is dependent on setting of J3. This
mode is NOT available on Zeta, DIDE, N8, or DISKIO V3.
The chart below attempts to describe the combinations that
work for me. By far, the most reliable mode is Polling,
but it requires 8MHz CPU for HD disks.
DRQ/WAIT --------------------------------+
INT/WAIT -----------------------------+ |
Fast Interrupt --------------------+ | |
Interrupt ----------------------+ | | |
Polling ---------------------+ | | | |
| | | | |
CPU Speed --------------+ | | | | |
| | | | | |
| | | | | |
3.5" DD (720K) ------ 4MHz Y Y Y Y X
8MHz+ Y Y Y Y X
3.5" HD (1.44M) ----- 4MHz N N Y Y X
8MHz+ Y Y Y Y X
5.25" DD (360K) ----- 4MHz Y Y Y Y X
8MHz+ Y Y Y Y X
5.25" HD (1.2M) ----- 4MHz N N Y Y X
8MHz+ Y Y Y Y X
8" DD (1.11M) ------- 4MHz N N Y Y X
8MHz+ Y Y Y Y X
Y = Yes, works
N = No, does not work
X = Experimental, probably won't work
Tracing
-------
Command/result activity to/from the FDC will be written out
if the trace setting is changed from '00' to '01' in setup.
Additionally, if a command failure is detected on any
command, that specific comand and results are written
regardless of the trace setting.
The format of the line written is:
<OPERATION>: <COMMAND BYTES> --> <RESULT BYTES> [<RESULT>]
For example, this is the output of a normal read operation:
READ: 46 01 00 00 01 02 09 1B FF --> 01 00 00 00 00 02 02 [OK]
Please refer to the i8272 data sheet for information on the
command and result bytes.
Note that the sense interrupt command can return a non-OK
result. This is completely normal in some cases. It is
necessary to "poll" the drive for seek status using
sense interrupt. If there is nothing to report, then
the result will be INVALID COMMAND. Additionally,
during a recalibrate operation, it may be necessary to
issue the command twice because the command will only step
the drive 77 times looking for track 0, but the head may be
up to 80 tracks away. In this case, the first recalibrate
fails, but the second should succeed. Here is what this
would look like if trace is turned on:
RECALIBRATE: 07 01 --> <EMPTY> [OK]
SENSE INTERRUPT: 08 --> 80 [INVALID COMMAND]
...
...
...
SENSE INTERRUPT: 08 --> 80 [INVALID COMMAND]
SENSE INTERRUPT: 08 --> 71 00 [ABNORMAL TERMINATION]
RECALIBRATE: 07 01 --> <EMPTY> [OK]
SENSE INTERRUPT: 08 --> 21 00 [OK]
Another example is when the FDC has just been reset. In
this case, you will see up to 4 disk change errors. Again
these are not a real problem and to be expected.
When tracing is turned off, the application tries to be
intelligent about error reporting. The specific errors
from sense interrupt documented above will be suppressed
because they are not a real problem. All other
errors will be displayed.
Error Handling
--------------
There is no automated error retry logic. This is very
intentional since the point is to expose the controller
and drive activity. Any error detected will result in
a prompt to abort, retry, or continue. Note that some
number of errors is considered normal for this
technology. An occasional error would not necessarily
be considered a problem.
CPU Speed
---------
I distribute the binary version of the application optimized for
20MHz CPUs. There is a configuration variable called CPUFREQ
at the top of the source file. Ideally, you should build
with that set appropriately. However, I have found that the
default build setting of 20MHz seems to work for 4-20MHz CPUs.
Interleave
----------
The format command now allows the specification of a sector
interleave. It is almost always the case that the optimal
interleave will be 2 (meaning 2:1).
360K Media
----------
The 360K media definition should work well for true 360K
drives. However, it will generally not work
with 1.2M drives. This is because these drives spin at 360RPM
instead of the 300RPM speed of true 360K drives. Additionally,
1.2M drives are 80 tracks and 360K drives are 40 tracks and, so
far, there is no mechanism in FDTST to "double step" as a way
to use 40 track media in 80 track drives.
With this said, it is possible to configure some 1.2M 5.25" drives
to automatically spin down to 300RPM based on a density select
signal (DENSEL). This signal is asserted by FDTST for 360K
media, so IF you have configured your drive to react to this
signal correctly, you will be able to use the 360K media defintion.
Most 1.2M 5.25" drives are NOT configured this way by default.
TEAC drives are generally easy to modify and have been tested by
the author and do work in this manner. Note that this does not
address the issue of double stepping above; you will just be
using the first 40 of 80 tracks.
Support
-------
I am happy to answer questions as fast and well as I am able.
Best contact is wwarthen@gmail.com or post something on the
N8VEM Google Group https://groups.google.com/forum/#!forum/n8vem.
Changes
-------
WW 8/12/2011
Removed call to pulse TC in the FDC initialization
after determining that it periodically caused the FDC to write
bad sectors. I am mystified by this, but definitely found it
to be true. Will revisit at some point -- probably a timing
issue between puslsing TC and whatever happens next.
Non-DMA mode was being set incorrectly for FAST-DMA mode.
It was set for non-DMA even though we were doing DMA. It is
interesting that it worked fine anyway. Fixed it anyway.
DIO_SETMEDIA was not clearing DCD_DSKRDY as it should. Fixed.
WW 8/26/2011: v1.1
Added support for Zeta. Note that INT/WAIT and DRQ/WAIT are
not available on Zeta. Note that Zeta provides the ability
to perform a reset of the FDC independent of a full CPU
reset. This is VERY useful and the FDC is reset anytime
a drive reset is required.
Added INT/WAIT support.
WW 8/28/2011: V1.2
All changes in this version are Zeta specific. Fixed FDC reset
logic and motor status display for Zeta (code from Sergey).
Modified Zeta disk change display to include it in the
command output line. This makes more sense because a command
must be issued to select the desired drive first. You can
use the SENSE INT command id you want to check the disk
change value at any time. It will also be displayed with
any other command output display.
WW 9/1/2011: V1.3
Added CPUFREQ configuration setting to tune
delays based on cpu speed. The build app
is set for 8MHz which also seems to work well
for 4MHz CPU's. Faster CPU speeds will
probably require tuning this setting.
WW 9/5/2011: V1.4
Changed the polling execution routines to utilize CPUFREQ
variable to optimize timeout counter. Most importantly,
this should allow the use of faster CPUs (like 20MHz).
WW 9/19/2011: V1.5
Zeta changes only. Added a call to FDC RESET after any
command failure. This solves an issue where the drive
remains selected if a command error occurs. Also
added FDC RESET to FDC CONTROL menu.
WW 10/7/2011: V2.0
Added support for DIDE. Only supports polling IO and it
does not appear any other modes are possible given the
hardware constraints.
WW 10/13/2011: V2.1
Modified to support N8. N8 is essentially identical to
Dual IDE. The only real change is the IO addresses. In
theory, I should be able to support true DMA on N8 and
will work on that.
WW 10/20/2011: v2.2
I had some problems with the results being read were
sometimes missing a byte. Fixed this by taking a more
strict approach to watching the MSR for the exact
bits that are expected.
WW 10/22/2011: V2.3
After spending a few days trying to track down an
intermittent data corruption issue with my Dual IDE
board, I added a verify function. This helped
me isolate the problem very nicely (turned out to
be interference from the bus monitor).
WW 11/25/2011: V2.4
Preliminary support for DISKIO V3. Basically just
assumed that it operates just like the Zeta. Needs
to be verified with real hardware as soon as I can.
WW 1/9/2012: V2.5
Modified program termination to use CP/M reset
call so that a warm start is done and all
drives are logged out. This is important
because media may have been formatted during
the program execution.
WW 2/6/2012: v2.6
Added support for 5.25" drives as tested by
Sergio.
WW 4/5/2012: v2.7
Added support for 8" drives as tested by
Jim Harre.
WW 4/6/2012: v2.7a
Fixed issue with media selection menu to remove
duplicate entries.
WW 4/8/2012: v2.7b
Corrected the handling of the density select
signal.
WW 5/22/2012: v2.8
Added new media definitions (5.25", 320K)
WW 6/1/2012: v2.9
Added interleave capability on format
WW 6/5/2012: v3.0
Documentation cleanup
WW 7/1/2012: v3.1
Modified head load time (HLT) for 8" media based on
YD-180 spec. Now set to 50ms.

169
Doc/Flash4.txt Normal file
View File

@@ -0,0 +1,169 @@
FLASH4 (c) 2014 William R Sowerbutts <will@sowerbutts.com>
http://sowerbutts.com/8bit/
= Warning =
FLASH4 has been tested and confirmed working on:
* SBCv2
* N8-2312
* Mark IV SBC
However it remains somewhat experimental. If it works for you, please let me
know. If it breaks please also let me know so I can fix it! Until it is more
widely tested please ensure you have some other means to reprogram your flash
ROM before exclusively trusting FLASH4.
= Introduction =
FLASH4 is a CP/M program which can read, write and verify Flash ROM contents to
or from an image file stored on a CP/M filesystem. It is intended for in-system
programming of Flash ROM chips on N8VEM Z80 and Z180 systems.
FLASH4 aims to support a range of Flash ROM chips. Ideally I would like to
support all Flash ROM chips that are in use in Z80/Z180 N8VEM machines. If
FLASH4 does not support your chip please let me know and I will try to add
support.
When writing to the Flash ROM chip, FLASH4 will only reprogram the sectors
whose contents have changed. This helps to reduce wear on the flash memory,
makes the reprogram operation faster, and reduces the risk of leaving the
system unbootable if power fails during a reprogramming operation. FLASH4
always performs a full verify operation after writing to the chip to confirm
that the correct data has been loaded.
FLASH4 is reasonably fast. Reprogramming and verifying every sector on a 512KB
SST 39F040 chip takes 21 seconds on my Mark IV SBC, versus 45 seconds to
perform the same task using a USB MiniPro TL866 EEPROM programmer under Linux
on my PC. If only a subset of sectors require reprogramming FLASH4 will be
even faster.
FLASH4 works with binary ROM image files, it does not support Intel Hex format
files. Hex files can be easily converted to or from binaries using "hex2bin" or
the "srec_cat" program from SRecord:
$ srec_cat image.hex -intel -fill 0xFF 0 0x80000 -output image.bin -binary
$ srec_cat image.bin -binary -output image.hex -intel
FLASH4 can use three different methods to access the Flash ROM chip. The best
available method is determined automatically at run time. Alternatively you may
provide a command-line option to force the use of a specific method.
The first two methods use bank switching to map sections of the ROM into the
CPU address space. FLASH4 will detect the presence of RomWBW or UNA BIOS and
use the bank switching methods they provide.
If neither RomWBW nor UNA BIOS is detected and the system has a Z180 CPU,
FLASH4 will use the Z180 DMA engine to access the Flash ROM chip. This does not
require any bank switching but it is slower and will not work on all platforms.
Z180 DMA access requires the flash ROM to be linearly mapped into the lower
region of physical memory, as it is on the Mark IV SBC. The N8-2312 has
additional memory mapping hardware, consequently Z180 DMA access on the N8-2312
is NOT SUPPORTED and if forced will corrupt the contents of RAM; use bank
switched access instead.
Z180 DMA access requires the Z180 CPU I/O base control register configured to
locate the internal I/O addresses at 0x40 (ie ICR bits IOA7, IOA6 = 0, 1).
= Usage =
The three basic operations are:
FLASH4 WRITE filename [options]
This will rewrite the flash ROM contents from the named file. The file size
must exactly match the size of the ROM chip. After the write operation, a
verify operation will be performed automatically.
FLASH4 VERIFY filename [options]
This will read out the flash ROM contents and report if it matches the contents
of the named file. The file size must exactly match the size of the ROM chip.
FLASH4 READ filename [options]
This will read out the entire flash ROM contents and write it to the named
file.
If your ROM chip is larger than the image you wish to write, use the "/PARTIAL"
(or "/P") command line option. To avoid accidentally flashing the wrong file,
the image file must be an exact multiple of 32KB in length. The portion of the
ROM not occupied by the image file is left either unmodified or erased.
One of the following optional command line arguments may be specified at the
end of the command line to force FLASH4 to use a particular method to access
the flash ROM chip:
/ROMWBW
/UNABIOS
/Z180DMA
If no option is specified FLASH4 attempts to determine the best available
method automatically.
= Supported chips and features =
FLASH4 will interrogate your flash ROM chip to identify it automatically.
FLASH4 assumes that you have a single flash ROM device and it is located at the
bottom of the physical memory map.
FLASH4 does not support setting or resetting the protection bits on individual
sectors within Flash ROM devices. If your Flash ROM chip has protected sectors
you will need to unprotect them by other means before FLASH4 can erase and
reprogram them.
AT29C series chips employ an optional "software data protection" feature. This
is supported by FLASH4 and is left activated after programming the chip to
prevent accidental reprogramming of sectors.
The following chips are supported:
AT29F010
AT29F040
M29F010
M29F040
MX29F040
SST 39F010
SST 39F020
SST 39F040
AT29C512
AT29C040
AT29C010
AT29C020
The following chips are supported but have unequal sector sizes; FLASH4 will
only erase and reprogram the entire chip at once rather than its normal
sector-by-sector operation:
AT49F001NT
AT49F001N
AT49F002N
AT49F002NT
AT49F040
If you use a flash ROM chip that is not listed above please email me
(will@sowerbutts.com) and I will try to add support for it.
= Compiling =
The software is written in a mix of C and assembler. It builds using the SDCC
toolchain and the SRecord tools. A Makefile is provided to build the executable
in Linux and I imagine it can be easily modified to build in Windows.
You may need to adjust the path to the SDCC libraries in the Makefile if your
sdcc installation is not in /usr/local
= License =
FLASH4 is licensed under the The GNU General Public License version 3 (see
included "LICENSE.txt" file).
FLASH4 is provided with NO WARRANTY. In no event will the author be liable for
any damages. Use of this program is at your own risk. May cause rifts in space
and time.

Binary file not shown.

45
Doc/LinuxBuild.txt Normal file
View File

@@ -0,0 +1,45 @@
Assembling the RomWBW firmware under Linux.
Note: Updated on 6/25/2013 to eliminate the need for the separate Linux
makefile. The standard makefile now has conditionals to allow it to be
used under Windows or Linux (I hope) --WW
This method has been used under Ubuntu Linux and may have to be adapted for
other distributions. It is a bit more involved than the Windows procedure.
What you need
You will need the TASM assembler, make, dos2unix and cpmtools.
The TASM assembler is shareware and the Linux version is only available as
source code from the Author. I found one bug during compiling version 3.2 for
Ubuntu. In /src/tasm.c change the reference CLK_TIC to CLOCKS_PER_SEC.
After compiling install the tasm executable to /usr/local/bin and the table
files to /usr/local/lib. If you choose to place them somewhere else you will
have to edit the "makefile.linux" file to suit.
The make, dos2unix and cpmtools packages are found in the Linux repository and
installed as for any other package.
Before assembly
Some changes need to be made to cater for the differences between Linux and the
DOS/Windows environments. The examples below refer to the /RomWBW/current
directory, you'll have to allow for the stable or branches directories if used.
These are all done from a terminal. (: is end of the command prompt)
1. Go to the RomWBW Source directory.e.g.
:cd /n8vem/RomWBW/current/Source
2. The Linux version of TASM can't handle the CR-LF line endings. So from the
command prompt use dos2unix to convert all the source files.
:~/RomWBW/current/Source dos2unix -f *.asm *.inc *.z80 *.lib diskdefs
3. You'll have to alter the disk definitions for the cpmtools package to cater
for the new roms. Easiest way is to copy the one given in the source over the
old. This must be done as superuser.
:~/RomWBW/current/Source sudo cp diskdefs /etc/cpmtools/diskdefs
4. From now on it's the same as using the DOS/Windows instructions in Build.txt.
Make any last changes, go to the Source directory and make
:~/RomWBW/current/Source make clean ; make
DGG

Binary file not shown.

View File

@@ -1,136 +0,0 @@
***********************************************************************
*** ***
*** R o m W B W ***
*** ***
*** Z80/Z180 System Software ***
*** ***
***********************************************************************
This directory ("Doc") is part of the RomWBW System Software
distribution archive. It contains documentation for components of
the system.
ChangeLog.txt
-------------
Log of changes in RomWBW by version.
RomWBW User Guide ("RomWBW User Guide.pdf")
RomWBW System Guide ("RomWBW System Guide.pdf")
RomWBW Applications ("RomWBW Applications.pdf")
RomWBW ROM Applications ("RomWBW ROM Applications.pdf")
RomWBW Disk Catalog ("RomWBW Disk Catalog.pdf")
RomWBW Errata ("RomWBW Errata.pdf")
-------------------------------------------------------
Documentation set for RomWBW. The primary document is the
User Guide. The System Guide explains internal system operation
and has a reference for the HBIOS API. Use of included tools
and utilities are detailed in the Applications and
ROM Applications documents.
CPM Manual ("CPM Manual.pdf")
-----------------------------
The original DRI CP/M 2.x Operating System Manual. This should be
considered the primary reference for system operation. The section
on CP/M 2 Alteration can be ignored since this work has already been
completed as part of the RomWBW distribution.
CPM3 Command Summary ("CPM3 Command Summary.pdf")
CPM3 Programmer's Guide ("CPM3 Programmers Guide.pdf")
CPM3 System Guide ("CPM3 System Guide.pdf")
CPM3 User's Guide ("CPM3 Users Guide.pdf")
------------------------------------------------------
The original DRI CP/M 3.0 Operating System Documentation Set. This
should be considered the primary reference for CP/M 3 system operation.
DDTZ Manual ("DDTZ.doc")
------------------------
Manual for the DDTZ v2.7 debug tool included on the ROM drive.
FDisk Manual ("FDisk Manual.pdf")
---------------------------------
The operational manual for John Coffman's hard disk partitioning
program. This program is included in RomWBW as FDISK80.
Hard Disk Anatomy ("Hard Disk Anatomy.pdf")
-------------------------------------------
Diagram of a CP/M & MS-DOS (FAT) hybrid hard disk layout.
NZCOM User's Manual ("NZCOM Users Manual.pdf")
----------------------------------------------
NZCOM operating system operation manual.
ZCPR Manual ("ZCPR Manual.pdf")
-------------------------------
ZCPR is the command proccessor portion of Z-System. This is the
manual for ZCPR 1.x as included in RomWBW. The installation
instructions can be ignored since that work has already been
completed as part of the RomWBW distribution.
ZCPR D&J Manual ("ZCPR-DJ.doc")
-------------------------------
ZCPR D&J User Manual. This manual supplements the ZCPR Manual.
ZSDOS Manual ("ZSDOS Manual.pdf")
---------------------------------
ZSDOS is the DOS portion of Z-System. This is the manual for ZSDOS
1.x as included in RomWBW. The installation instructions can be
ignored since that work has already been completed as part of the
RomWBW distribution.
Microsoft Basic-80 Reference Manual v5.0 (Microsoft Basic-80 Reference Manual v5.0.pdf)
---------------------------------------------------------------------------------------
Official manual for Microsoft BASIC as included in RomWBW.
QP/M 2.7 Installation Guide and Supplements ("qpm27.pdf")
QP/M 2.7 Interface Guide ("qdos27.pdf")
QP/M 2.7 Features and Facilities ("qcp27.pdf")
--------------------------------------------
Official documentation set for QP/M 2.7 from original QP/M distribution.
SIO+CTC Baud Rate Options (SIO+CTC Baud Rate Options.pdf)
---------------------------------------------------------
Documents possible baud rates available based on different baud
clock rates for Zilog SIO using CTC for baud rate clock generation.
Z180 ASCI Baud Rate Options ("Z180 ASCI Baud Rate Options.pdf")
---------------------------------------------------------------
The Z180 processor's ASCI serial ports have a limited set of
baud rate divisors. These divisors are relative to the CPU
clock rate. This document provides a list of the possible
baud rates for typical CPU clock rates.
UCSD p-System Users Manual ("UCSD p-System Users Manual.pdf")
-------------------------------------------------------------
Official user manual for p-System operating system included with
RomWBW.
--WBW 5:18 PM 3/16/2023

BIN
Doc/Reference/cpm22-m.pdf Normal file

Binary file not shown.

1387
Doc/Reference/zcpr.doc Normal file

File diff suppressed because it is too large Load Diff

Binary file not shown.

BIN
Doc/RomWBW Architecture.pdf Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -1,144 +0,0 @@
SIMH (X)
----
- Test UART driver
- Test HDSK driver
Zeta 1 (X)
------
- Test UART driver
- Test PPP detection (startup w/ and w/o PPP)
- Test boot to CRT
- Test PPPSD driver
- Test PPPCON driver (video & kbd)
- Test FD driver
- Test FDU app
Zeta 2 (X)
------
- Test UART driver
- Test PPP detection (startup w/ and w/o PPP)
- Test boot to CRT
- Test PPPSD driver
- Test PPPCON driver (video & kbd)
- Test FD driver
- Test FDU app
RCBus (X)
------
- Test SIO driver (Serial Module)
- Test ACIA driver (Dual Serial Module)
- Test IDE driver (Compact Flash Module)
- Test PPIDE driver (IDE Module)
- Test FD driver (SMC and WDC)
- Test FDU app (SMC and WDC)
N8-2312 (X)
-------
- Test ASCI driver
- Test SD driver (CSIO mode)
- Test FD driver
- Test FDU app
- Test TMS driver (video & kbd)
N8-2511 (X)
-------
- Test ASCI driver
- Test SD driver (Juha mode)
- Test FD driver
- Test FDU app
- Test TMS driver (video & kbd)
SBC (X)
---
- Test UART driver
- Test PPIDE driver
- Test PPISD driver
- Test PRP detection
- Test boot to CRT console
MK4 (X)
---
- Test ASCI driver
- Test IDE driver
- Test SD driver
- Test PRP detection
RAMF (X)
----
- Test RAMF driver
PRP (X)
---
- Test PRPSD driver
- Test PRPCON driver (video & kbd)
SCG (X)
---
- Test TMS driver (video)
VDU (X)
---
- Test CVDU driver (video & kbd)
CVDU (X)
----
- Test CVDU driver (video & kbd)
VGA (X)
---
- Test VGA driver (video & kbd)
DIO (X)
---
- Test FD driver
- Test FDU app
- Test IDE driver
DIO3 (X)
----
- Test FD driver
- Test FDU app
- Test PPIDE driver
DIDE (X)
----
- Test FD driver
- Test FDU app
- Test IDE driver
DSD (X)
---
- Test SD driver
4UART (X)
-----
- Test UART driver
UNA (X)
---
- General Startup
- Boot from disk functionality
- Image loading
- Monitor
- XM app
- ASSIGN app
- MODE app
- SYSCOPY app
- OSLDR app
- FDU app
- FDISK80 app
GENERAL (X)
-------
- Boot to ROM
- Boot to Disk
- Boot to Monitor
- XM app
- XM port auto-detect
- ASSIGN app
- MODE app
- SYSCOPY app
- FDU app
- FDISK80 app
- TUNE app

Binary file not shown.

Binary file not shown.

19
Doc/Z180 Clocking.txt Normal file
View File

@@ -0,0 +1,19 @@
The table below can be used to determine the correct value for CLKDIV AND CNTLB
in an Z180 (N8) configuration file. OSC Freq refers to the hardware clock
oscillator frequency you are using. You can then choose a CLKDIV value which
will result in the CPU speed (frequency) shown below the oscillator frequency.
Using your oscillator frequency (OSC) and chosen value for CLKDIV, you can
use the appropriate column to derive values to use for CNTLB for different
baud rates.
----- CLKDIV = 0 ----- ----- CLKDIV = 1 -----
OSC Freq (MHz) 6.144 12.288 18.432 6.144 12.288 18.432
CPU Freq (MHz) 3.072 6.144 9.216 6.144 12.288 18.432
1200 baud 04H 05H 24H 05H 06H 25H
2400 baud 03H 04H 23H 04H 05H 24H
4800 baud 02H 03H 22H 03H 04H 23H
9600 baud 01H 02H 21H 02H 03H 22H
19200 baud 00H 01H 20H 01H 02H 21H
38400 baud --- 00H --- 00H 01H 20H

Binary file not shown.

View File

@@ -1,765 +0,0 @@
A Personal Note
===============
Somehow, I've managed to get by for the last 14 years using just ZCPR.
But like some of you, I have fiddled with the standard ZCPR and
modified it to suit my tastes. As I added new commands or enriched old
ones, I've always remained compatible with existing programs, all the
BDOS replacements, and, most important of all, stayed within the 800H
space allocation of the original Digital Research CCP. Here are the
fruits of my labors, I hope you enjoy this CCP replacement as much as I
do.
Don Kirkpatrick
17595 S.W. Pheasant Lane
Beaverton, Oregon 97006
<Donald.C.Kirkpatrick@tek.com>
Introduction
============
This console replacement is designed to run under CP/M 2.2 or any of
the 2.2 BDOS replacements. It requires a Z80 or better. If you are
running DRI's CCP or older versions of ZCPR1, this program is a
significant improvement. If you are running ZCPR3, CP/M 3.0, CP/M
Plus, or MP/M, this will probably be a disappointment.
If you are familiar with ZCPR3, you will recognize many of the
enhancements here: comments on a command line, search path for the .com
file, drive/user change with simple du:, CLEVEL3 command processing,
proper SUBMIT file facility, and so on. Nothing has been removed from
DRI's CCP, only new features added. AND IT ALL STILL FITS IN THE
ORIGINAL 800H, THE SAME SPACE AS THE DIGITAL RESEARCH FIVE COMMAND
CCP.
Many of the standard commands have been enhanced. For example, TYPE
and LIST now have options to turn on or off page breaks. Moreover, the
console check for abort has been improved.
Two commands have been added for use in submit files - SAK and BELL.
These commands allow you to pause or ring the bell during submit file
execution.
Before you install this version of ZCPR onto your boot disks, try it by
running it as a .com file. Just edit the few customizing options and
assemble the source. After you decide it really is better, load it
onto your boot track and make it your standard. Complete instructions
are located at the end of this document.
The complete built-in command list is:
DIR - directory command enhanced to list optionally all user areas
REN - standard rename command
USER- move to new user number area on same drive
SAVE- save specified number of TPA pages or records in a file
TYPE- display a file on the console with optional page break pauses
LIST- print command plus optional form feed insertion
PAGE- send form feed to list device
ERA - standard file erase command
ERAQ- file erase with confirmation query at each file
DFU - set default user number for .com search path
BELL- send a bell character to the console
SAK - pause until a key is struck on the console (Strike Any Key)
SCL - toggle multiple commands per line (Single Command on a Line)
GET - load a file into the TPA at any specified location
JUMP- process command tail and execute program at specified address
GO - process command tail and execute program loaded at 100H
PEEK- display hexadecimal byte string starting with specified address
POKE- load hexadecimal byte string starting with specified address
BOOT- execute BIOS cold boot routine
Filename Processing
===================
The standard ZCPR3 du: drive/user file specification has been
implemented. Any filename can be in the du:fn.ft form. For example:
A>era c4:junk*.*
erases files on the C drive, user area 4 without leaving drive A user
0. When a user number is found in a filename, that user number is
placed in S1 of the default FCB. Bit 7 of S1 is set to inform the
program using the FCB a user number was found.
The * in an ambiguous file name has been improved. Now a trailing *
causes the remainder of the ambiguous name to be filled with '?', not
just the fn field. For example:
A>era c4:junk*
is the same as the example above. Previously, junk* was defined as
'junk????. '. If you need the ft field blank, type 'junk*.'. The
question mark still works as a single character wild card.
Command Line Processing
=======================
The current user number is included as part of the command prompt for
all non-zero user numbers. The prompt is of the form du>, for example
A2> or B10>. If the SUPRES equate is true, the user number is
suppressed for user 0 only.
Multiple commands are typed on a single line separated by a command
separator character. Occasionally, you need to type the separator
character in a command tail. The SCL command toggles the multiple
command enable. The CMDCHR equate determines the command separator
character. A ';' has been chosen as the separator character in this
distribution version.
Comments are allowed on a command line. When the comment separator
character is encountered as the first character of a command, the
remainder of the line is ignored. The COMCHR equate determines the
comment separator character. A ';' has been chosen as the separator
character in this distribution version. Here is an example containing
comments and multiple commands on a single line:
A>get 100 junk;peek 100;;this is a comment.
A>;this is also a comment.
There exists a built-in search path for transient commands. First, the
current drive/user is searched. Next, the current drive/default user
is searched. Last, drive A/default user is searched. The DEFUSR
equate determines the default user number, currently set to user 0 in
this distribution version. The default user is temporarily changed
with the DFU command. If a drive is specified in the transient
command, the current and default user areas on the specified drive are
searched. If a user number is specified, that user area on the current
and default drive are searched. If both the drive and user number are
specified, no search is performed. The same drive/user area is never
searched twice.
Transient commands are always "called." If a program terminates via a
return rather than a warm boot, subsequent multiple commands on the
command line are executed. Any program exiting by a warm boot reloads
ZCPR and the subsequent commands lost.
A default command can be placed in the command buffer and control
passed to ZCPR for processing. The only thing required, besides
placing the command in the buffer and jumping to CPRLOC, is to
initialize the command character counter at the start of the buffer.
The procedure is compatible with the original DRI CCP default command
processing. If ZCPR is entered at CPRLOC+3 jump, default command
processing is suppressed. Either way, register C must contain a valid
drive/user, just like the original CCP.
Submit File Processing
======================
A basic design choice had to be made in the design of ZCPR concerning
the execution of submit files. The original CCP had a problem. It
ALWAYS looked for the $$$.SUB file on drive A and the submit program
would place it on the current default drive. When the you were logged
onto drive B and you issued a submit command, the $$$.SUB was placed on
drive B and not executed.
After much debate it was decided to have ZCPR perform the same type of
function as CCP (look for the $$$.SUB file on drive A), but the problem
with SUBMIT.COM still exists. Hence, RGF designed SuperSUB and RLC
took his SuperSUB and designed SUB from it; both programs are set up to
allow the selection at assembly time of creating the $$$.SUB on the
default drive or on drive A. If you don't have one of these newer
submit programs, a procedure for patching the standard SUBMIT.COM has
been included at the end.
The fixed drive choice permits a submit file to contain a series of
commands exactly as they would be entered from a CP/M console. This
permits things like:
A>dir
A>b:
B>dir
to be executed, even though the currently default drive is changed
during execution. If the $$$.SUB file were present on the default
drive, the above series of commands would not work. ZCPR would be
looking for $$$.SUB on the default drive, and switching default drives
without moving the $$$.SUB file would cause processing to abort. Note
that the same problem occurs if the user number of the $$$.SUB file is
not predefined. ZCPR assumes that the $$$.SUB file is located on user 0
of drive A.
The trick of using the $ flag returned by the BDOS disk reset is used
to speed the search for a $*.* file on drive A. This trick will not
work if the $$$.SUB file were located on another drive.
The '>' prompt character is replaced by a special character while a
submit file is in execution. The SPRMPT equate defines this special
character, currently set to '$' in this distribution version.
Command Syntax
==============
Multiple commands can be placed on one line. If the comment character
is encountered where a command should start, the rest of the line is
ignored. Any command can be renamed by editing the command table.
Command names can be up to eight characters long and are terminated by
bit 7 high. If there is a conflict between an internal ZCPR command
and a transient program of the same name, the internal command is
executed. Type the command with the du: included if the external
transient command is the one desired. Here is a complete alphabetized
list of all the resident commands with their syntax:
=============================================================================
Command: BELL
Function: To ring terminal bell.
Forms: BELL
Options: None.
Uses: This command is designed to be placed in a submit file to
ring the bell to indicate significant checkpoints.
=============================================================================
Command: BOOT
Function: To execute BIOS cold boot routine.
Forms: BOOT
Options: REBOOT equate controls the inclusion/exclusion of this command.
Uses: Reboots the system without pushing the reset button. The
cold boot entry point in the BIOS must be supported for this
command to work.
=============================================================================
Command: DFU
Function: To set the Default User Number for transient commands.
Forms: DFU <usrnum>
Options: DEFUSR equate defines the default user choice until this
command is entered.
NUMBASE equate defines the character that specifies a
hexadecimal number. The distribution version is set to 'H'.
Uses: The default user area is searched after a transient command
cannot be found in the current user area. If the transient
command still has not been found, the default user on the
default drive is searched last. The new default user number
is in decimal, but hexadecimal numbers are entered by
appending an 'H'. The next warm boot will restore the
original default user number.
=============================================================================
Command: DIR
Function: To display a directory listing of the files on a drive.
Forms: DIR <afn> Display the DIR files
DIR <afn> S Display the SYS files
DIR <afn> B Display both DIR and SYS files
DIR <afn> A Display both DIR and SYS files for all user areas
Options: TWOCOL equate controls the number of columns in the display.
Forty-column terminals are limited to two-column displays.
WIDE equate controls the spacing between the columns and
change the horizontal width of a directory display.
FENCE equate specifies the character separator between the
directory columns.
USRDLM equate specifies the character between the user number
and the filename.
USRFLG, SYSFLG, and SOFLG equates specify the command line
tail character that control the display of system and
non-system files.
Uses: Displays a directory listing of files in specific drive/user
area.
=============================================================================
Command: ERA
Function: To erase files.
Forms: ERA <afn>
Options: None.
Uses: Deletes files. Names of erased files are displayed.
=============================================================================
Command: ERAQ
Function: To erase files with individual query.
Forms: ERAQ <afn>
<afn>? y File erased
<afn>? <CR> File not erased
Options: None.
Uses: Deletes a subset of a set of ambiguously specified files.
Any answer other than 'Y' (either case) will cause the file
to be skipped and not erased.
=============================================================================
Command: GET
Function: To load the specified file from disk to the specified address.
Forms: GET <hexadr> <ufn>
Options: None.
Uses: Loads a file into the TPA for patching purposes. This command
searches for the specified file along the same search path as
the transient command loader.
=============================================================================
Command: GO
Function: To call the program in the TPA without loading from disk.
Forms: GO <command tail>
Options: None.
Uses: Most useful to rerun a program already loaded into the TPA.
Saves time and wear on disk drives. The command tail is
entered exactly as it would appear if GO were replaced by the
program name. Same as JUMP 100H, but more convenient,
especially when used with parameters for programs like STAT.
=============================================================================
Command: JUMP
Function: To call the program at a specified address.
Forms: JUMP <hexadr> <command tail>
Options: None.
Uses: Executes code not located at 100H. For example, JUMP 0
warm boots. The code must already reside at the specified
address.
=============================================================================
Command: LIST
Function: To print specified file on list device.
-
Forms: LIST <ufn> Print file
LIST <ufn> P Print file without default paging
Options: NLINEP equate determines the number of lines per page.
FFKILL equate controls the suppression of form feeds before
printable text.
PGDFLG equate determines the command line tail character that
toggles the default form feed insertion every NLINEP lines.
NOSTAT equate controls the use of the BIOS list status call.
Uses: Prints files with/without pagination on LST: device. A
listing is aborted by a console ^C. Any submit file in
process is terminated and control is returned gracefully to
the console prompt.
=============================================================================
Command: PAGE
Function: To eject a page on list device via a form feed.
Forms: PAGE
Options: NOSTAT equate controls the use of the BIOS list status call.
Uses: Sends a form feed to the LST: device. The page eject can
be aborted by a console ^C if the system hangs because the
printer is not ready. If aborted, any submit file in process
is terminated and control is returned gracefully to the
console prompt.
=============================================================================
Command: PEEK
Function: To display hex values beginning at a specified address.
Forms: PEEK <hexadr> [<hexcnt>]
Options: None.
Uses: Displays hexadecimal values anywhere in the entire address
space. The maximum value for <hexcnt> is 0FFH, but the
default <hexcnt> is 256.
=============================================================================
Command: POKE
Function: To poke a string of hex values into a set of consecutive
addresses.
Forms: POKE <hexadr> <hexval> [...<hexval>]
Options: None.
Uses: Modifies values anywhere in the entire address space. Each
<hexval> represents one byte and is separated from the next
by a space. The number of <hexval> are limited only by the
size of the command line buffer. The address is incremented
for each <hexval>. Excellent for hand patching code.
=============================================================================
Command: REN
Function: To change the name of an existing file.
Forms: REN <newufn>=<oldufn>
REN <newufn>=<oldufn> Existing <newufn>
Delete? y File deleted
Options: None.
Uses: Changes the names of files. Any du: on <oldufn> is ignored;
the optional du: is on <newufn>. If there already exists a
<newufn>, the console is queried for conformation. Any
response except 'Y' (either case) aborts the command, kills
any submit file in process, and returns gracefully to the
command prompt.
=============================================================================
Command: SAK
Function: To pause until a key is struck.
Forms: SAK
? <any key>
Options: None.
Uses: Pauses a submit file until a keystroke is entered. Any
character other than a ^C will resume execution. A ^C kills
the submit file, any commands remaining on the command the
line are ignored, and control returns gracefully to the
prompt.
=============================================================================
Command: SAVE
Function: To save the contents of TPA onto disk as a file.
Forms: SAVE <Number of Pages> <ufn>
SAVE <Number of Records> <ufn> R
Options: RECFLG equate determines the command tail character that
specifies records rather than pages.
NUMBASE equate defines the character that specifies a
hexadecimal number. The distribution version is set to 'H'.
Uses: Saves the TPA to a file. Records are 128 bytes long, pages
are 256 bytes long. Number of pages or records is in
decimal, but a hexadecimal number is entered by appending an
'H'. Saved area begins at 100H.
=============================================================================
Command: SCL
Function: To force ZCPR to parse only a single command per line.
Forms: SCL
Options: MULTPL equate determines the inclusion/exclusion of this
command and whether or not multiple commands are allowed.
CMDCHR equate determines the character separating multiple
commands.
Uses: Some transient commands require the command separator in the
command tail. This command turns off multiple command
parsing so the entire command tail is sent to the transient
program. Multiple command format is reset at the next warm
boot. SCL toggles.
=============================================================================
Command: TYPE
Function: To display specified file on console.
Forms: TYPE <ufn> Display file
TYPE <ufn> P Display file without default paging
Options: NLINES equate determines the number of lines per screen.
FFKILL equate controls the suppression of form feeds before
printable text.
PGDFLG equate determines the command line tail character that
toggles the default form feed insertion every NLINEP lines.
Uses: Displays files with/without pagination on CON: device. A
display is aborted by a console ^C. If aborted, any submit
file in process terminates and control returns gracefully to
the console prompt. When page breaks are enabled, any
console character except ^C will display the next page of
text.
=============================================================================
Command: USER
Function: To change current user number.
Forms: USER <usrnum>
Options: SUPRES equate controls the display of the user number in the
prompt when the user number is zero.
MAXUSR equate controls the maximum allowable user number.
NUMBASE equate defines the character that specifies a
hexadecimal number. The distribution version is set to 'H'.
Uses: This command changes the current user number. The new user
number is in decimal, but a hexadecimal number is entered by
appending an 'H'. This command has been retained for
compatibility purposes only. It is far easier to change
disk/user by typing du:.
=============================================================================
Error Messages
==============
If any error is encountered as a command line is being parsed, a
message will be printed and, for serious errors, the remainder of the
line is ignored. Below is a complete list of all ZCPR error messages.
Any error message encountered that is not on this list came from some
program other than ZCPR.
"?"
An error was detected in the command. The an item on the command
line was not what was expected. The command line is echoed up to
the position where the error was detected, as close as can be
determined, and the "?" printed. Any commands remaining on the
command the line are ignored and any $$$.SUB file erased.
"Full"
If ZCPR was attempting to load a transient program, one of two
things has gone wrong: either the program is so large that it won't
fit into the TPA or a read error was returned from the BDOS. If
ZCPR was attempting to save a file, the BDOS write call returned
failure. Either the disk or the directory is full. Any commands
remaining on the command line are ignored and any $$$.SUB file
erased.
"No File"
No file could be found matching the filename specified in the
command. This message is also be printed if the BDOS read command
returns failure. If ZCPR was looking for a transient command, any
commands remaining on the command line are ignored and any $$$.SUB
file erased.
"Name Error"
The specified filename has a user number larger than the allowable
maximum or an ambiguous filename was entered where only an
unambiguous filename is permitted. Any commands remaining on the
command line are ignored and any $$$.SUB file erased.
"Delete?"
Not really an error, but there already exists a file with the same
name as the requested new name in the REN command. Any response
except 'Y' (either case) aborts the command, any commands remaining
on the command line are ignored, and any $$$.SUB file erased.
"All?"
Not really an error, but a check to verify that all files on the
drive/user area are to be erased. Any response except 'Y' (either
case) aborts the command and any commands remaining on the command
line are ignored.
Installation Instructions
=========================
1) The first task is to determine the location of your BDOS because you
MUST set the P2DOS equate to this value. If you do not know the
location of your BDOS, use ZCPRDEMO to find it. If you do not
already have ZCPRDEMO.COM, assemble ZCPR with the TEST equate true
to make it. A bootstrap loader will be included and you can run the
.com file. This program assembles without errors using Microsoft's
M80/L80:
A>m80 =zcpr
A>l80 zcpr,zcprdemo/n/e
Other assemblers can be used, but ZCPR.MAC will probably require
editing to convert it to a form compatible. The major decision in
converting is to determine how the .PHASE pseudo is to be handled.
Probably the best solution to the .PHASE is to generate a .hex
file and load it with an offset using DDT/SID/ZSID. Consult the
"r" command in the DDT/SID/ZSID manaul.
Run ZCPRDEMO and peek at low memory:
A>zcprdemo
A<peek 0 10
0000 C3 03 F2 00 00 C3 06 E4 00 00 00 00 00 00 00 00
A<^C
Notice the prompt character has changed from a '>' to a '<'. This
tells you the special debug version of ZCPR is running. See the
debug section at the end for details. Address 0 contains a jump 3
beyond the start of the BIOS and address 5 contains a jump 6 beyond
the start of the BDOS.
Be careful if you attempt to execute a transient program from
ZCPRDEMO. Some transient programs, like NSWP, return rather than
warm boot when done. These programs don't know that ZCPRDEMO is at
address 8000H rather than just under the BDOS. If they overwrite
ZCPRDEMO, then the return is to random code. Of course, this is not
a problem when ZCPR is installed just under the BDOS.
2) You MUST edit the code to place your BDOS/P2DOS/Z80DOS/ZRDOS start
address in the P2DOS equate. Set COMLD true (and TEST false if you
set it true in step 1 above) and make ZCPR.COM. A bootstrap loader
will be included.
Assuming you successfully assemble it, just type "zcpr" to run it.
However, every time there is a warm boot, it will be replaced by
the boot track CCP. If you like what you see, place a copy on the
boot track to make it available all the time.
3) Reassemble, this time with COMLD false to make ZCPRNBLD.COM (ZCPR
No Boot LoaDer).
4) Run SYSGEN to load a copy of the boot track into memory.
B>; Sample terminal session for integrating ZCPR
B>sysgen
SYSGEN VER 2.2
SOURCE DRIVE NAME (OR RETURN TO SKIP)a
SOURCE ON A, THEN TYPE RETURN <cr>
FUNCTION COMPLETE
DESTINATION DRIVE NAME (OR RETURN TO REBOOT) <cr>
5) Run SAVE to save a track image to a file (eg: SAVE 32 BOOTFILE).
The number on the save command depends on the size of your boot
track loader; it can be as small as 31 and as large as 44. If you
have extra disk space or are not sure, play it safe and use 44.
B>save 44 cpm56.com <-- We now have a SYSGEN image of CP/M
6) Find the location of the stock CCP by peeking at the boot file. It
is normally located at address 980H in the file. Using ZCPR:
B>zcpr <-- Reload zcpr.com version
B>get 100 cpm56.com
and search for the start of the console processor:
B>peek 980
0980 C3 xx xx C3 xx xx 7F 00 43 4F 50 59 52 49 47 48
0990 54 20 ...
If you don't find the start of the CCP at 980H, don't be
discouraged. It is there, but at a higher address. Keep looking.
7) When you find the location of the CCP, patch it with the new ZCPR
image.
B>get 980 zcprnbld.com
8) Place the new file onto the boot track of a test disk, not your
original, using SYSGEN, and try it out.
B>sysgen
SYSGEN VER 2.2
SOURCE DRIVE NAME (OR RETURN TO SKIP) <cr> <-- Use memory image
DESTINATION DRIVE NAME (OR RETURN TO REBOOT)b <-- Load onto drive B
DESTINATION ON B, THEN TYPE RETURN <cr>
FUNCTION COMPLETE
DESTINATION DRIVE NAME (OR RETURN TO REBOOT) <cr>
You should now have a ZCPR system boot disk. Notice you did all
your work on drive B so you wouldn't destroy the original.
This may seem like a great number of steps, but each is only a single
CP/M command line, total time is only 5 minutes or so after you get
ZCPR to run as a .com file.
Debugging ZCPR
==============
Special provisions have been make to ease the debugging of ZCPR.
Setting the TEST equate true causes the assembler to build a version of
ZCPR that executes in the TPA. This allows the use of a debugger like
DDT, ZSID, or Z8E to load and monitor execution. To identify the debug
version, the prompt character is changed from '>' to '<' when it runs.
CPRLOC for the test version is 8000H. A bootstrap loader is included
at the beginning to move the image to this address. Do not try to set
a breakpoint until after the loader has moved ZCPR. The easiest way to
accomplish this is to single-step through the loader and then set your
breakpoints. Change the execution address to something lower if 8000H
does not leave enough space for the debugger.
A small amount of code is also added at the end of the debug version to
compute the BIOS list status and cold boot entry points at run time.
This permits the demo version to execute properly without setting the
BDOS location equate.
Patching SUBMIT.COM
===================
SUBMIT.COM is patched to run with ZCPR by the following procedure.
This is recommended if the user does not have one of the newer public
domain versions of submit. This patch simply makes SUBMIT.COM always
place the $$$.SUB file on drive A. Illustrative terminal session
follows:
A>get 100 submit.com;peek 5bb 2
05BB 00 24 <-- Patch is at 5BB Hex
A>poke 5bb 1 <-- Change 0 (default drive) to 1 (drive A)
A>peek 5b0 20 <-- Let's check just to make sure
05B0 00 00 00 00 00 00 30 30 31 20 24 01 24 24 24 20
05C0 20 20 20 20 53 55 42 00 00 00 1A 1A 1A 1A 1A 1A
A>save 5 newsubmt.com <-- Save new SUBMIT.COM file
Pretty simple, huh?
ny error message encountered that is not on this list came from some
prog

View File

@@ -1,9 +1,3 @@
ZSDOS Adaptation Notes for RomWBW
---------------------------------
Wayne Warthen
wwarthen@gmail.com
This file is a log of the work done to adapt the ZSDOS distribution to the N8VEM platforms under RomWBW. I strongly recommend reviewing the zsdos.pdf file in the Doc directory.
The starting point was the general public release of ZSDOS that is generally available. The first line of the README file is "ZSDOS-GP. General Public Release of the ZSDOS 1.x Operating System."
@@ -20,7 +14,7 @@ Beyond the construction and integration of the actual DOS itself, the majority o
The remainder of this document details the changes I made as I went along. In all cases, my goal was to keep the result as close to the original distribution as possible. I started by copying all of the files from the distribution (contained in zsdos2.zip) into Support\ZSDOS. From there I tested, modified, updated, and customized as documented below. Finally, I cherry picked files that made sense to include on the ZSystem ROM disks.
1. CLOCKS.DAT has been updated to include the RomWBW clock driver, HBCLK. I have also added the SIMHCLOK clock driver.
1. CLOCKS.DAT has been updated to include the N8VEM clock drivers, N8VEMCLK AND N8CLK. I have also added the SIMHCLOK clock driver.
2. STAMPS.DAT has been replaced with an updated version. The update was called STAMPS11.DAT and was found on the Walnut Creek CP/M CDROM. The original version has a bug that prevents RSX (resident system extension) mode to load properly.
@@ -32,8 +26,6 @@ The remainder of this document details the changes I made as I went along. In a
6. Updated FILEATTR to v1.6A. Original FILEATTR.CFG was invalid. FILEATTR.CFG replaced with FA16.CFG. Added associated files FA16.DOC, FA16A.FOR, FA16CFG.TXT.
7. ZCAL patched to be Y2K compliant. Contributed by Nick Brok.
Usage Notes
-----------

Binary file not shown.

Binary file not shown.

Binary file not shown.

29
FixPowerShell.cmd Normal file
View File

@@ -0,0 +1,29 @@
@echo off
echo By default, PowerShell is configured to block the
echo execution of unsigned scripts on your local system.
echo This command file will attempt to modify your
echo PowerShell ExecutionPolicy to "Unrestricted"
echo which means that local scripts can be run without
echo being signed. This is required to use the RomWBW
echo build process.
echo.
PowerShell -command Write-Host "Your PowerShell ExecutionPolicy is currently set to: `'(Get-ExecutionPolicy)`'"
echo.
echo In order to modify the ExecutionPolicy, this command
echo file *MUST* be run with administrator privileges.
echo Generally, this means you want to right-click the
echo command file called FixPowerShell.cmd and choose
echo "Run as Administrator". If you attempt to continue
echo without administrator privileges, the modification
echo will fail with an error message, but no harm is done.
echo.
choice /m "Do you want to proceed"
if errorlevel 2 goto :eof
echo.
echo Attempting to change Execution Policy...
echo.
PowerShell Set-ExecutionPolicy Unrestricted
echo.
PowerShell -command Write-Host "Your new PowerShell ExecutionPolicy is now set to: `'(Get-ExecutionPolicy)`'"
echo.
pause

Binary file not shown.

View File

@@ -0,0 +1,2 @@
rem ..\..\..\Tools\bst\bstc -Ox -ls -e -p0 -dCOM5: PropIO2.spin
..\..\..\Tools\bst\bstc -Ox -ls -e PropIO2.spin

View File

@@ -0,0 +1 @@
{{

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@@ -25,9 +25,6 @@ CON
ERR_3v3_NOT_SUPPORTED = -2
ERR_OCR_FAILED = -3
ERR_BLOCK_NOT_LONG_ALIGNED = -4
ERR_CRC_ONOFF_FAILED = -5
ERR_STATUS_FAILED = -6
ERR_CSD_FAILED = -7
'...
' These errors are for the assembly engine...they are negated inside, and need to be <= 511
ERR_ASM_NO_READ_TOKEN = 100
@@ -61,17 +58,14 @@ CON
' buffer size for my debug cmd log
'LOG_SIZE = 256<<1
{
VAR
'long SPI_engine_cog
'' these are used for interfacing with the assembly engine | temporary initialization usage
'long SPI_command ' "t", "r", "w", 0 =>done, <0 => error | pin mask
'long SPI_block_index ' which 512-byte block to read/write | cnt at init
'long SPI_buffer_address ' where to get/put the data in Hub RAM | unused
'long SPI_capacity
'byte SPI_csdbuf[16]
long SPI_engine_cog
' these are used for interfacing with the assembly engine | temporary initialization usage
long SPI_command ' "t", "r", "w", 0 =>done, <0 => error | pin mask
long SPI_block_index ' which 512-byte block to read/write | cnt at init
long SPI_buffer_address ' where to get/put the data in Hub RAM | unused
'}
DAT
'' I'm placing these variables in a DAT section to make this driver a singleton.
'' If for some reason you really need more than one driver (e.g. if you have more
@@ -82,9 +76,6 @@ SPI_command long 0 ' "t", "r", "w", 0 =>done, <0 => error
SPI_block_index long 0 ' which 512-byte block to read/write | cnt at init
SPI_buffer_address long 0 ' where to get/put the data in Hub RAM | unused
SPI_capacity long 0
SPI_csdbuf byte 0 [16]
{
VAR
' for debug ONLY
@@ -124,12 +115,6 @@ PUB writeblock( block_index, buffer_address )
if SPI_command < 0
abort SPI_command
PUB getcapacity
Result := SPI_capacity
PUB getcsd( buffer_address )
bytemove(buffer_address, @SPI_csdbuf, 16)
PUB get_seconds
if SPI_engine_cog == 0
abort ERR_SPI_ENGINE_NOT_RUNNING
@@ -154,8 +139,6 @@ PUB start_explicit( DO, CLK, DI, CS ) : card_type | tmp, i
}}
' Start from scratch
stop
' Reset card capacity
SPI_capacity := 0
' clear my log buffer
{
bytefill( @log_cmd_resp, 0, LOG_SIZE+1 )
@@ -234,48 +217,10 @@ PUB start_explicit( DO, CLK, DI, CS ) : card_type | tmp, i
repeat while send_cmd_slow( CMD1, 0, $F9 )
' some SD or MMC cards may have the wrong block size, set it here
send_cmd_slow( CMD16, 512, $15 )
' card is mounted, make sure the CRC is turned off
if send_cmd_slow( CMD59, 0, $91 ) <> 0
crash( ERR_CRC_ONOFF_FAILED )
' check card status
if send_cmd_slow ( CMD13, 0, $FF) <> 0
crash( ERR_STATUS_FAILED )
read_slow ' swallow second byte of status
' get card capacity
if send_cmd_slow ( CMD9, 0, $FF) <> 0
crash( ERR_CSD_FAILED )
i := 32 ' arbitrary timeout
repeat while (read_slow <> $FE)
if i == 0
crash( ERR_CSD_FAILED )
repeat i from 0 to 15 ' 16 bytes of CSD data
SPI_csdbuf[i] := read_slow
read_slow ' discard CRC - first byte
read_slow ' discard CRC - second byte
case (card_type)
type_MMC, type_SD:
tmp := SPI_csdbuf[9]
tmp := (tmp << 8) | SPI_csdbuf[10]
i := ((tmp >> 7) & $07) ' c_size_mult
tmp := SPI_csdbuf[5]
i += tmp & $0F ' mask out read_bl_len and add to c_size_mult
tmp := SPI_csdbuf[6] & $03
tmp := (tmp << 8) | SPI_csdbuf[7]
tmp := (tmp << 8) | SPI_csdbuf[8]
tmp := (tmp >> 6) ' c_size
SPI_capacity := ((tmp + 1) << (2 + i)) >> 9
type_SDHC:
tmp := SPI_csdbuf[7] & $3F
tmp := (tmp << 8) | SPI_csdbuf[8]
tmp := (tmp << 8) | SPI_csdbuf[9]
SPI_capacity := (tmp + 1) * 1024
other:
SPI_capacity := 0
send_cmd_slow( CMD59, 0, $91 )
' check the status
'send_cmd_slow( CMD13, 0, $0D )
' done with the SPI bus for now
outa |= maskCS
' set my counter modes for super fast SPI operation

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1 @@
bstc -Ox -ls -e -p0 -dCOM5: vgademo.spin

View File

@@ -0,0 +1,17 @@
SPINC= bstc.linux
SPINC_FLAGS= -Ox -ls -e -p0 -d/dev/ttyS0
INCLUDES= -L../lib
VERSION= 0.0.4
all: vgademo
vgademo: vgademo.spin vga8x8d.spin vt100.spin
$(SPINC) $(SPINC_FLAGS) $(INCLUDES) -o $@ $<
clean:
rm -f *.eeprom *.lst *.list *.bck *.o
dist: clean
cd .. && rm -f vgademo-$(VERSION).zip && \
zip -r vgademo-$(VERSION).zip vga2

Binary file not shown.

View File

@@ -0,0 +1,619 @@
'' This object generates a 640x480 VGA signal which contains 80 columns x 30
'' rows of 8x8 double scan characters. Each character can have a unique forground
'' and background color combination and each character can be inversed and highlit.
'' There are also two cursors which can be independently controlled (ie. mouse
'' and keyboard). A sync indicator signals each time the screen is refreshed
'' (you may ignore).
''
'' You must provide buffers for the screen, cursors, and sync. Once started,
'' all interfacing is done via memory. To this object, all buffers are
'' read-only, with the exception of the sync indicator which gets written with
'' -1. You may freely write all buffers to affect screen appearance. Have fun!
''
CON
' 640 x 480 @ 69Hz settings: 80 x 30 characters
hp = 640 ' horizontal pixels
vp = 480 ' vertical pixels
hf = 24 ' horizontal front porch pixels
hs = 40 ' horizontal sync pixels
hb = 128 ' horizontal back porch pixels
vf = 20 ' vertical front porch lines
vs = 3 ' vertical sync lines
vb = 17 ' vertical back porch lines
hn = 1 ' horizontal normal sync state (0|1)
vn = 1 ' vertical normal sync state (0|1)
pr = 30 ' pixel rate in MHz at 80MHz system clock (5MHz granularity)
' columns and rows
cols = hp / 8
rows = vp / 16
VAR long cog[2]
PUB start(BasePin, ScreenPtr, CursorPtr, SyncPtr) : okay | i, j
'' Start VGA driver - starts two COGs
'' returns false if two COGs not available
''
'' BasePin = VGA starting pin (0, 8, 16, 24, etc.)
''
'' ScreenPtr = Pointer to 80x30 words containing Latin-1 codes and colors for
'' each of the 80x30 screen characters. The lower byte of the word
'' contains the Latin-1 code to display. The upper byte contains
'' the foreground colour in bits 11..8 and the background colour in
'' bits 15..12.
''
'' screen word example: %00011111_01000001 = "A", white on blue
''
'' CursorPtr = Pointer to 6 bytes which control the cursors:
''
'' bytes 0,1,2: X, Y, and MODE of cursor 0
'' bytes 3,4,5: X, Y, and MODE of cursor 1
''
'' X and Y are in terms of screen characters
'' (left-to-right, top-to-bottom)
''
'' MODE uses three bottom bits:
''
'' %x00 = cursor off
'' %x01 = cursor on
'' %x10 = cursor on, blink slow
'' %x11 = cursor on, blink fast
'' %0xx = cursor is solid block
'' %1xx = cursor is underscore
''
'' cursor example: 127, 63, %010 = blinking block in lower-right
''
'' SyncPtr = Pointer to long which gets written with -1 upon each screen
'' refresh. May be used to time writes/scrolls, so that chopiness
'' can be avoided. You must clear it each time if you want to see
'' it re-trigger.
' if driver is already running, stop it
stop
' implant pin settings
reg_vcfg := $200000FF + (BasePin & %111000) << 6
i := $FF << (BasePin & %011000)
j := BasePin & %100000 == 0
reg_dira := i & j
reg_dirb := i & !j
' implant CNT value to sync COGs to
sync_cnt := cnt + $10000
' implant pointers
longmove(@screen_base, @ScreenPtr, 2)
font_base := @font
' implant unique settings and launch first COG
vf_lines.byte := vf
vb_lines.byte := vb
font_part := 1
cog[1] := cognew(@entry, SyncPtr) + 1
' allow time for first COG to launch
waitcnt($2000 + cnt)
' differentiate settings and launch second COG
vf_lines.byte := vf+8
vb_lines.byte := vb-8
font_part := 0
cog[0] := cognew(@entry, SyncPtr) + 1
' if both COGs launched, return true
if cog[0] and cog[1]
return true
' else, stop any launched COG and return false
stop
PUB stop | i
'' Stop VGA driver - frees two COGs
repeat i from 0 to 1
if cog[i]
cogstop(cog[i]~ - 1)
CON
hv_inactive = (hn << 1 + vn) * $0101 'H,V inactive states
DAT
'*****************************************************
'* Assembly language VGA high-resolution text driver *
'*****************************************************
' This program runs concurrently in two different COGs.
'
' Each COG's program has different values implanted for front-porch lines and
' back-porch lines which surround the vertical sync pulse lines. This allows
' timed interleaving of their active display signals during the visible portion
' of the field scan. Also, they are differentiated so that one COG displays
' even four-line groups while the other COG displays odd four-line groups.
'
' These COGs are launched in the PUB 'start' and are programmed to synchronize
' their PLL-driven video circuits so that they can alternately prepare sets of
' four scan lines and then display them. The COG-to-COG switchover is seemless
' due to two things: exact synchronization of the two video circuits and the
' fact that all COGs' driven output states get OR'd together, allowing one COG
' to output lows during its preparatory state while the other COG effectively
' drives the pins to create the visible and sync portions of its scan lines.
' During non-visible scan lines, both COGs output together in unison.
'
org 0 ' set origin to $000 for start of program
entry
' Initialization code and data - after execution, space gets reused as scanbuff
' Init I/O registers and sync COGs' video circuits
mov dira, reg_dira ' set pin directions
mov dirb, reg_dirb
movi frqa, #(pr / 5) << 2 ' set pixel rate
mov vcfg, reg_vcfg ' set video configuration
mov vscl, #1 ' set video to reload on every pixel
waitcnt sync_cnt, colormask ' wait for start value in cnt, add ~1ms
movi ctra, #%00001_110 ' COGs in sync! enable PLLs now - NCOs locked!
waitcnt sync_cnt, #0 ' wait ~1ms for PLLs to stabilize - PLLs locked!
mov vscl, #100 ' insure initial WAITVIDs lock cleanly
' Main loop, display field - each COG alternately builds and displays four scan lines
vsync mov x, #vs ' do vertical sync lines
call #blank_vsync
vb_lines mov x, #vb ' do vertical back porch lines (# set at runtime)
call #blank_vsync
mov screen_ptr, screen_base ' reset screen pointer to upper-left character
mov row, #0 ' reset row counter for cursor insertion
mov fours, #rows ' set number of 4-line builds for whole screen
' Build four scan lines into scanbuff
fourline mov font_ptr, font_part ' get address of appropriate font section
shl font_ptr, #7+2
add font_ptr, font_base
movd :pixa, #scanbuff-1 ' reset scanbuff address (pre-decremented)
movd :pixb, #scanbuff-1 ' reset scanbuff address (pre-decremented)
movd :cola, #colorbuff-1 ' reset colorbuff address (pre-decremented)
movd :colb, #colorbuff-1
mov y, #4 ' must build scanbuff in four sections because
mov vscl, vscl_line2x ' ..pixel counter is limited to twelve bits
:halfrow waitvid underscore, #0 ' output lows to let other COG drive VGA pins
mov x, #cols/4 ' ..for 2 scan lines, ready for a quarter row
:column rdword z, screen_ptr ' get character and colors from screen memory
mov bg, z
ror z, #7
shr z, #32 - 9 wc
add z, font_ptr ' add font section address to point to 8*4 pixels
add :pixa, d0 ' increment scanbuff destination addresses
add :pixb, d0 ' increment scanbuff destination addresses
add screen_ptr, #2 ' increment screen memory address
cmp font_part, #1 wz
:pixa rdlong scanbuff, z ' read pixel long (8*4) into scanbuff
:pixb if_c_and_z or scanbuff, underline
ror bg, #12 ' background color in bits 3..0
mov fg, bg ' foreground color in bits 31..28
shr fg, #28 ' bits 3..0
add fg, #fg_clut ' + offset to foreground CLUT
movs :cola, fg
add :cola, d0
add bg, #bg_clut ' + offset to background CLUT
movs :colb, bg
add :colb, d0
:cola mov colorbuff, 0-0
:colb or colorbuff, 0-0
djnz x, #:column ' another character in this half-row?
djnz y, #:halfrow ' loop to do 2nd half-row, time for 2nd WAITVID
' Insert cursors into scanbuff
mov z, #2 ' ready for two cursors
:cursor rdbyte x, cursor_base ' x in range?
add cursor_base, #1
cmp x, #cols wc
rdbyte y, cursor_base ' y match?
add cursor_base, #1
cmp y, row wz
rdbyte y, cursor_base ' get cursor mode
add cursor_base, #1
if_nc_or_nz jmp #:nocursor ' if cursor not in scanbuff, no cursor
add x, #scanbuff ' cursor in scanbuff, set scanbuff address
movd :xor, x
test y, #%010 wc ' get mode bits into flags
test y, #%001 wz
if_nc_and_z jmp #:nocursor ' if cursor disabled, no cursor
if_c_and_z test slowbit, cnt wc ' if blink mode, get blink state
if_c_and_nz test fastbit, cnt wc
test y, #%100 wz ' get box or underscore cursor piece
if_z mov x, longmask
if_nz mov x, underscore
if_nz cmp font_part, #1 wz ' if underscore, must be last font section
:xor if_nc_and_z xor scanbuff, x ' conditionally xor cursor into scanbuff
:nocursor djnz z, #:cursor ' second cursor?
sub cursor_base, #3*2 ' restore cursor base
' Display four scan lines from scanbuff
mov y, #4 ' ready for four scan lines
scanline
mov x, #2 wc ' clear carry and set sweep count
sweep
mov vscl, vscl_chr
waitvid colorbuff+ 0, scanbuff+ 0
if_c ror scanbuff+ 0, #8
waitvid colorbuff+ 1, scanbuff+ 1
if_c ror scanbuff+ 1, #8
waitvid colorbuff+ 2, scanbuff+ 2
if_c ror scanbuff+ 2, #8
waitvid colorbuff+ 3, scanbuff+ 3
if_c ror scanbuff+ 3, #8
waitvid colorbuff+ 4, scanbuff+ 4
if_c ror scanbuff+ 4, #8
waitvid colorbuff+ 5, scanbuff+ 5
if_c ror scanbuff+ 5, #8
waitvid colorbuff+ 6, scanbuff+ 6
if_c ror scanbuff+ 6, #8
waitvid colorbuff+ 7, scanbuff+ 7
if_c ror scanbuff+ 7, #8
waitvid colorbuff+ 8, scanbuff+ 8
if_c ror scanbuff+ 8, #8
waitvid colorbuff+ 9, scanbuff+ 9
if_c ror scanbuff+ 9, #8
waitvid colorbuff+10, scanbuff+10
if_c ror scanbuff+10, #8
waitvid colorbuff+11, scanbuff+11
if_c ror scanbuff+11, #8
waitvid colorbuff+12, scanbuff+12
if_c ror scanbuff+12, #8
waitvid colorbuff+13, scanbuff+13
if_c ror scanbuff+13, #8
waitvid colorbuff+14, scanbuff+14
if_c ror scanbuff+14, #8
waitvid colorbuff+15, scanbuff+15
if_c ror scanbuff+15, #8
waitvid colorbuff+16, scanbuff+16
if_c ror scanbuff+16, #8
waitvid colorbuff+17, scanbuff+17
if_c ror scanbuff+17, #8
waitvid colorbuff+18, scanbuff+18
if_c ror scanbuff+18, #8
waitvid colorbuff+19, scanbuff+19
if_c ror scanbuff+19, #8
waitvid colorbuff+20, scanbuff+20
if_c ror scanbuff+20, #8
waitvid colorbuff+21, scanbuff+21
if_c ror scanbuff+21, #8
waitvid colorbuff+22, scanbuff+22
if_c ror scanbuff+22, #8
waitvid colorbuff+23, scanbuff+23
if_c ror scanbuff+23, #8
waitvid colorbuff+24, scanbuff+24
if_c ror scanbuff+24, #8
waitvid colorbuff+25, scanbuff+25
if_c ror scanbuff+25, #8
waitvid colorbuff+26, scanbuff+26
if_c ror scanbuff+26, #8
waitvid colorbuff+27, scanbuff+27
if_c ror scanbuff+27, #8
waitvid colorbuff+28, scanbuff+28
if_c ror scanbuff+28, #8
waitvid colorbuff+29, scanbuff+29
if_c ror scanbuff+29, #8
waitvid colorbuff+30, scanbuff+30
if_c ror scanbuff+30, #8
waitvid colorbuff+31, scanbuff+31
if_c ror scanbuff+31, #8
waitvid colorbuff+32, scanbuff+32
if_c ror scanbuff+32, #8
waitvid colorbuff+33, scanbuff+33
if_c ror scanbuff+33, #8
waitvid colorbuff+34, scanbuff+34
if_c ror scanbuff+34, #8
waitvid colorbuff+35, scanbuff+35
if_c ror scanbuff+35, #8
waitvid colorbuff+36, scanbuff+36
if_c ror scanbuff+36, #8
waitvid colorbuff+37, scanbuff+37
if_c ror scanbuff+37, #8
waitvid colorbuff+38, scanbuff+38
if_c ror scanbuff+38, #8
waitvid colorbuff+39, scanbuff+39
if_c ror scanbuff+39, #8
waitvid colorbuff+40, scanbuff+40
if_c ror scanbuff+40, #8
waitvid colorbuff+41, scanbuff+41
if_c ror scanbuff+41, #8
waitvid colorbuff+42, scanbuff+42
if_c ror scanbuff+42, #8
waitvid colorbuff+43, scanbuff+43
if_c ror scanbuff+43, #8
waitvid colorbuff+44, scanbuff+44
if_c ror scanbuff+44, #8
waitvid colorbuff+45, scanbuff+45
if_c ror scanbuff+45, #8
waitvid colorbuff+46, scanbuff+46
if_c ror scanbuff+46, #8
waitvid colorbuff+47, scanbuff+47
if_c ror scanbuff+47, #8
waitvid colorbuff+48, scanbuff+48
if_c ror scanbuff+48, #8
waitvid colorbuff+49, scanbuff+49
if_c ror scanbuff+49, #8
waitvid colorbuff+50, scanbuff+50
if_c ror scanbuff+50, #8
waitvid colorbuff+51, scanbuff+51
if_c ror scanbuff+51, #8
waitvid colorbuff+52, scanbuff+52
if_c ror scanbuff+52, #8
waitvid colorbuff+53, scanbuff+53
if_c ror scanbuff+53, #8
waitvid colorbuff+54, scanbuff+54
if_c ror scanbuff+54, #8
waitvid colorbuff+55, scanbuff+55
if_c ror scanbuff+55, #8
waitvid colorbuff+56, scanbuff+56
if_c ror scanbuff+56, #8
waitvid colorbuff+57, scanbuff+57
if_c ror scanbuff+57, #8
waitvid colorbuff+58, scanbuff+58
if_c ror scanbuff+58, #8
waitvid colorbuff+59, scanbuff+59
if_c ror scanbuff+59, #8
waitvid colorbuff+60, scanbuff+60
if_c ror scanbuff+60, #8
waitvid colorbuff+61, scanbuff+61
if_c ror scanbuff+61, #8
waitvid colorbuff+62, scanbuff+62
if_c ror scanbuff+62, #8
waitvid colorbuff+63, scanbuff+63
if_c ror scanbuff+63, #8
waitvid colorbuff+64, scanbuff+64
if_c ror scanbuff+64, #8
waitvid colorbuff+65, scanbuff+65
if_c ror scanbuff+65, #8
waitvid colorbuff+66, scanbuff+66
if_c ror scanbuff+66, #8
waitvid colorbuff+67, scanbuff+67
if_c ror scanbuff+67, #8
waitvid colorbuff+68, scanbuff+68
if_c ror scanbuff+68, #8
waitvid colorbuff+69, scanbuff+69
if_c ror scanbuff+69, #8
waitvid colorbuff+70, scanbuff+70
if_c ror scanbuff+70, #8
waitvid colorbuff+71, scanbuff+71
if_c ror scanbuff+71, #8
waitvid colorbuff+72, scanbuff+72
if_c ror scanbuff+72, #8
waitvid colorbuff+73, scanbuff+73
if_c ror scanbuff+73, #8
waitvid colorbuff+74, scanbuff+74
if_c ror scanbuff+74, #8
waitvid colorbuff+75, scanbuff+75
if_c ror scanbuff+75, #8
waitvid colorbuff+76, scanbuff+76
if_c ror scanbuff+76, #8
waitvid colorbuff+77, scanbuff+77
if_c ror scanbuff+77, #8
waitvid colorbuff+78, scanbuff+78
if_c ror scanbuff+78, #8
waitvid colorbuff+79, scanbuff+79
mov vscl, #hf ' do horizontal front porch pixels
waitvid hvsync, #0 ' #0 makes hsync inactive
mov vscl, #hs ' do horizontal sync pixels
waitvid hvsync, #1 ' #1 makes hsync active
mov vscl, #hb ' do horizontal back porch pixels
waitvid hvsync, #0 ' #0 makes hsync inactive
if_c ror scanbuff+79, #8
test x, #2 wc ' set carry
djnz x, #sweep
djnz y, #scanline ' another scan line?
' Next group of four scan lines
add row, #1 ' if new row, increment row counter
djnz fours, #fourline ' another 4-line build/display?
' Visible section done, do vertical sync front porch lines
wrlong longmask,par ' write -1 to refresh indicator
vf_lines mov x,#vf ' do vertical front porch lines (# set at runtime)
call #blank
jmp #vsync ' new field, loop to vsync
' Subroutine - do blank lines
blank_vsync xor hvsync,#$101 ' flip vertical sync bits
blank mov vscl, hx ' do blank pixels
waitvid hvsync, #0
mov vscl, #hf ' do horizontal front porch pixels
waitvid hvsync, #0
mov vscl, #hs ' do horizontal sync pixels
waitvid hvsync, #1
mov vscl, #hb ' do horizontal back porch pixels
waitvid hvsync, #0
djnz x, #blank ' another line?
blank_ret
blank_vsync_ret
ret
' Data
screen_base long 0 ' set at runtime (3 contiguous longs)
cursor_base long 0 ' set at runtime
font_base long 0 ' set at runtime
font_part long 0 ' set at runtime
hx long hp ' visible pixels per scan line
vscl_line2x long (hp + hf + hs + hb) * 2 ' total number of pixels per 2 scan lines
vscl_chr long 1 << 12 + 8 ' 1 clock per pixel and 8 pixels per set
colormask long $fcfc ' mask to isolate R,G,B bits from H,V
longmask long $ffffffff ' all bits set
slowbit long 1 << 25 ' cnt mask for slow cursor blink
fastbit long 1 << 24 ' cnt mask for fast cursor blink
underscore long $ffff0000 ' underscore cursor pattern
underline long $ff000000
hv long hv_inactive ' -H,-V states
hvsync long hv_inactive ^ $200 ' +/-H,-V states
d0 long 1 << 9
d0s0 long 1 << 9 + 1
d1 long 1 << 10
reg_dira long 0 ' set at runtime
reg_dirb long 0 ' set at runtime
reg_vcfg long 0 ' set at runtime
sync_cnt long 0 ' set at runtime
bg_clut long %00000011_00000011 ' black
long %00000011_00001011 ' dark blue
long %00000011_00100011 ' dark green
long %00000011_00101011 ' dark cyan
long %00000011_10000011 ' dark red
long %00000011_10001011 ' dark magenta
long %00000011_10100011 ' brown
long %00000011_10101011 ' light gray
long %00000011_01010111 ' dark gray
long %00000011_00001111 ' light blue
long %00000011_00110011 ' light green
long %00000011_00111111 ' light cyan
long %00000011_11000011 ' light red
long %00000011_11001111 ' light magenta
long %00000011_11110011 ' light yellow
long %00000011_11111111 ' white
fg_clut long %00000011_00000011 ' black
long %00000111_00000011 ' dark blue
long %00010011_00000011 ' dark green
long %00010111_00000011 ' dark cyan
long %01000011_00000011 ' dark red
long %01000111_00000011 ' dark magenta
long %01010011_00000011 ' brown
long %10101011_00000011 ' light gray
long %01010111_00000011 ' dark gray
long %00001011_00000011 ' blue
long %00100011_00000011 ' green
long %00101011_00000011 ' cyan
long %10000011_00000011 ' red
long %10001011_00000011 ' magenta
long %10100011_00000011 ' yellow
long %11111111_00000011 ' white
' Uninitialized data
screen_ptr res 1
font_ptr res 1
x res 1
y res 1
z res 1
fg res 1
bg res 1
row res 1
fours res 1
scanbuff res 80
colorbuff res 80
fit $1f0
' 8 x 12 font - characters 0..127
'
' Each long holds four scan lines of a single character. The longs are arranged into
' groups of 128 which represent all characters (0..127). There are four groups which
' each contain a vertical part of all characters. They are ordered top, middle, and
' bottom.
font long
long $00000000,$0f0f0f0f,$f0f0f0f0,$ffffffff,$00000000,$0f0f0f0f,$f0f0f0f0,$ffffffff
long $00000000,$0f0f0f0f,$f0f0f0f0,$ffffffff,$00000000,$0f0f0f0f,$f0f0f0f0,$ffffffff
long $7e5a3c00,$7e3c1800,$7e7e2400,$7e3c1800,$f8000000,$1f000000,$f8181818,$1f181818
long $18181818,$ff000000,$1f181818,$f8181818,$ff181818,$ff000000,$ff181818,$aa55aa55
long $00000000,$18181800,$66666600,$66ff6600,$3c067c18,$18366600,$1c386c38,$18181800
long $0c0c1830,$3030180c,$ff3c6600,$7e181800,$00000000,$7e000000,$00000000,$18306000
long $76663c00,$181c1800,$30663c00,$18307e00,$3c383000,$3e067e00,$3e063c00,$30607e00
long $3c663c00,$7c663c00,$18180000,$18180000,$0c183060,$007e0000,$30180c06,$30663c00
long $76663c00,$663c1800,$3e663e00,$06663c00,$66361e00,$3e067e00,$3e067e00,$06067c00
long $7e666600,$18187e00,$60606000,$1e366600,$06060600,$feeec600,$7e6e6600,$66663c00
long $66663e00,$66663c00,$66663e00,$3c063c00,$18187e00,$66666600,$66666600,$d6c6c600
long $3c666600,$3c666600,$18307e00,$0c0c0c3c,$0c060200,$3030303c,$c66c3810,$00000000
long $30180c00,$603c0000,$3e060600,$063c0000,$7c606000,$663c0000,$7c187000,$667c0000
long $3e060600,$1c001800,$60006000,$36060600,$18181c00,$fe660000,$663e0000,$663c0000
long $663e0000,$667c0000,$663e0000,$067c0000,$187e1800,$66660000,$66660000,$d6c60000
long $3c660000,$66660000,$307e0000,$0c181830,$18181800,$3018180c,$0000366c,$142a142a
long $00000000,$00000000,$00000000,$00000000,$0f0f0f0f,$0f0f0f0f,$0f0f0f0f,$0f0f0f0f
long $f0f0f0f0,$f0f0f0f0,$f0f0f0f0,$f0f0f0f0,$ffffffff,$ffffffff,$ffffffff,$ffffffff
long $007e187e,$007e187e,$00183c7e,$00183c7e,$181818f8,$1818181f,$000000f8,$0000001f
long $18181818,$000000ff,$1818181f,$181818f8,$000000ff,$181818ff,$181818ff,$aa55aa55
long $00000000,$00180018,$00000000,$0066ff66,$00183e60,$0062660c,$00dc66f6,$00000000
long $30180c0c,$0c183030,$0000663c,$00001818,$0c181800,$00000000,$00181800,$0002060c
long $003c666e,$007e1818,$007e0c18,$003c6630,$00307e36,$003c6660,$003c6666,$000c0c18
long $003c6666,$001c3060,$00181800,$0c181800,$00603018,$00007e00,$00060c18,$00180018
long $007c0676,$00667e66,$003e6666,$003c6606,$001e3666,$007e0606,$00060606,$007c6676
long $00666666,$007e1818,$003c6660,$0066361e,$007e0606,$00c6c6d6,$0066767e,$003c6666
long $0006063e,$006c3666,$0066363e,$003c6060,$00181818,$007e6666,$00183c66,$00c6eefe
long $0066663c,$00181818,$007e060c,$3c0c0c0c,$00603018,$3c303030,$00000000,$ff000000
long $00000000,$007c667c,$003e6666,$003c0606,$007c6666,$003c067e,$00181818,$3e607c66
long $00666666,$003c1818,$3c606060,$0066361e,$003c1818,$00c6d6fe,$00666666,$003c6666
long $06063e66,$60607c66,$00060606,$003e603c,$00701818,$007c6666,$00183c66,$006c7cfe
long $00663c18,$1e307c66,$007e0c18,$00301818,$00181818,$000c1818,$00000000,$002a142a
{{
+------------------------------------------------------------------------------------------------------------------------------+
| TERMS OF USE: Parallax Object Exchange License |
+------------------------------------------------------------------------------------------------------------------------------+
|Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation | |files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, |
|modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software|
|is furnished to do so, subject to the following conditions: |
| |
|The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.|
| |
|THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE |
|WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR |
|COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, |
|ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
+------------------------------------------------------------------------------------------------------------------------------+
}}

View File

@@ -0,0 +1,602 @@
''***************************************
''* VGA High-Res Text Driver v1.0 *
''* Author: Chip Gracey *
''* Copyright (c) 2006 Parallax, Inc. *
''* See end of file for terms of use. *
''***************************************
''
'' This object generates a 640x480 VGA signal which contains 80 columns x 30
'' rows of 8x16 characters. Each character can have a unique forground/background
'' color combination and each character can be inversed and high-lighted.
'' There are also two cursors which can be independently controlled (ie. mouse
'' and keyboard). A sync indicator signals each time the screen is refreshed
'' (you may ignore).
''
'' You must provide buffers for the screen, cursors, and sync. Once started,
'' all interfacing is done via memory. To this object, all buffers are
'' read-only, with the exception of the sync indicator which gets written with
'' -1. You may freely write all buffers to affect screen appearance. Have fun!
''
CON
' 640 x 480 @ 69Hz settings: 80 x 30 characters
hp = 640 ' horizontal pixels
vp = 480 ' vertical pixels
hf = 24 ' horizontal front porch pixels
hs = 40 ' horizontal sync pixels
hb = 128 ' horizontal back porch pixels
vf = 20 ' vertical front porch lines
vs = 3 ' vertical sync lines
vb = 17 ' vertical back porch lines
hn = 1 ' horizontal normal sync state (0|1)
vn = 1 ' vertical normal sync state (0|1)
pr = 30 ' pixel rate in MHz at 80MHz system clock (5MHz granularity)
' columns and rows
cols = hp / 8
rows = vp / 16
VAR long cog[2]
PUB start(BasePin, ScreenPtr, CursorPtr, SyncPtr) : okay | i, j
'' Start VGA driver - starts two COGs
'' returns false if two COGs not available
''
'' BasePin = VGA starting pin (0, 8, 16, 24, etc.)
''
'' ScreenPtr = Pointer to 80x30 words containing Latin-1 codes and colors for
'' each of the 80x30 screen characters. The lower byte of the word
'' contains the Latin-1 code to display. The upper byte contains
'' the foreground colour in bits 11..8 and the background colour in
'' bits 15..12.
''
'' screen word example: %00011111_01000001 = "A", white on blue
''
'' CursorPtr = Pointer to 6 bytes which control the cursors:
''
'' bytes 0,1,2: X, Y, and MODE of cursor 0
'' bytes 3,4,5: X, Y, and MODE of cursor 1
''
'' X and Y are in terms of screen characters
'' (left-to-right, top-to-bottom)
''
'' MODE uses three bottom bits:
''
'' %x00 = cursor off
'' %x01 = cursor on
'' %x10 = cursor on, blink slow
'' %x11 = cursor on, blink fast
'' %0xx = cursor is solid block
'' %1xx = cursor is underscore
''
'' cursor example: 127, 63, %010 = blinking block in lower-right
''
'' SyncPtr = Pointer to long which gets written with -1 upon each screen
'' refresh. May be used to time writes/scrolls, so that chopiness
'' can be avoided. You must clear it each time if you want to see
'' it re-trigger.
' if driver is already running, stop it
stop
' implant pin settings
reg_vcfg := $200000FF + (BasePin & %111000) << 6
i := $FF << (BasePin & %011000)
j := BasePin & %100000 == 0
reg_dira := i & j
reg_dirb := i & !j
' implant CNT value to sync COGs to
sync_cnt := cnt + $10000
' implant pointers
longmove(@screen_base, @ScreenPtr, 2)
font_base := @font
' implant unique settings and launch first COG
vf_lines.byte := vf
vb_lines.byte := vb
font_part := 1
cog[1] := cognew(@d0, SyncPtr) + 1
' allow time for first COG to launch
waitcnt($2000 + cnt)
' differentiate settings and launch second COG
vf_lines.byte := vf+4
vb_lines.byte := vb-4
font_part := 0
cog[0] := cognew(@d0, SyncPtr) + 1
' if both COGs launched, return true
if cog[0] and cog[1]
return true
' else, stop any launched COG and return false
stop
PUB stop | i
'' Stop VGA driver - frees two COGs
repeat i from 0 to 1
if cog[i]
cogstop(cog[i]~ - 1)
CON
#1, scanbuff[80], colorbuff[80], scancode[2*80-1+3], maincode 'enumerate COG RAM usage
main_size = $1F0 - maincode 'size of main program
hv_inactive = (hn << 1 + vn) * $0101 'H,V inactive states
DAT
'*****************************************************
'* Assembly language VGA high-resolution text driver *
'*****************************************************
' This program runs concurrently in two different COGs.
'
' Each COG's program has different values implanted for front-porch lines and
' back-porch lines which surround the vertical sync pulse lines. This allows
' timed interleaving of their active display signals during the visible portion
' of the field scan. Also, they are differentiated so that one COG displays
' even four-line groups while the other COG displays odd four-line groups.
'
' These COGs are launched in the PUB 'start' and are programmed to synchronize
' their PLL-driven video circuits so that they can alternately prepare sets of
' four scan lines and then display them. The COG-to-COG switchover is seemless
' due to two things: exact synchronization of the two video circuits and the
' fact that all COGs' driven output states get OR'd together, allowing one COG
' to output lows during its preparatory state while the other COG effectively
' drives the pins to create the visible and sync portions of its scan lines.
' During non-visible scan lines, both COGs output together in unison.
'
' COG RAM usage: $000 = d0 - used to inc destination fields for indirection
' $001-$050 = scanbuff - longs which hold 4 scan lines
' $051-$010 = colorbuff - longs which hold colors for 80 characters
' $0a1-$142 = scancode - stacked WAITVID/SHR for fast display
' $143-$1EF = maincode - main program loop which drives display
org 0 ' set origin to $000 for start of program
d0 long 1 << 9 ' d0 always resides here at $000, executes as NOP
' Initialization code and data - after execution, space gets reused as scanbuff
' Move main program into maincode area
:move mov $1EF, main_begin + main_size - 1
sub :move,d0s0 ' (do reverse move to avoid overwrite)
djnz main_ctr,#:move
' Build scanbuff display routine into scancode
:waitvid mov scancode+0, i0 ' org scancode
:shr mov scancode+1, i1 ' waitvid colorbuff+0, scanbuff+0
add :waitvid, d1 ' shr scanbuff+0,#8
add :shr, d1 ' waitvid colorbuff+1, scanbuff+1
add i0, d0s0 ' shr scanbuff+1,#8
add i1, d0 ' ...
djnz scan_ctr, #:waitvid ' waitvid colorbuff+cols-1, scanbuff+cols-1
mov scancode+cols*2-1, i2 ' mov vscl,#hf
mov scancode+cols*2+0, i3 ' waitvid hvsync,#0
mov scancode+cols*2+1, i4 ' jmp #scanret
' Init I/O registers and sync COGs' video circuits
mov dira, reg_dira ' set pin directions
mov dirb, reg_dirb
movi frqa, #(pr / 5) << 2 ' set pixel rate
mov vcfg, reg_vcfg ' set video configuration
mov vscl, #1 ' set video to reload on every pixel
waitcnt sync_cnt, colormask ' wait for start value in cnt, add ~1ms
movi ctra, #%00001_110 ' COGs in sync! enable PLLs now - NCOs locked!
waitcnt sync_cnt, #0 ' wait ~1ms for PLLs to stabilize - PLLs locked!
mov vscl, #100 ' insure initial WAITVIDs lock cleanly
' Jump to main loop
jmp #vsync ' jump to vsync - WAITVIDs will now be locked!
' Data
d0s0 long 1 << 9 + 1
d1 long 1 << 10
main_ctr long main_size
scan_ctr long cols
i0 waitvid colorbuff+0, scanbuff+0
i1 shr scanbuff+0, #8
i2 mov vscl, #hf
i3 waitvid hvsync, #0
i4 jmp #scanret
reg_dira long 0 ' set at runtime
reg_dirb long 0 ' set at runtime
reg_vcfg long 0 ' set at runtime
sync_cnt long 0 ' set at runtime
' Directives
fit scancode ' make sure initialization code and data fit
main_begin org maincode ' main code follows (gets moved into maincode)
' Main loop, display field - each COG alternately builds and displays four scan lines
vsync mov x, #vs ' do vertical sync lines
call #blank_vsync
vb_lines mov x, #vb ' do vertical back porch lines (# set at runtime)
call #blank_vsync
mov screen_ptr, screen_base ' reset screen pointer to upper-left character
mov row, #0 ' reset row counter for cursor insertion
mov fours, #rows * 4 / 2 ' set number of 4-line builds for whole screen
' Build four scan lines into scanbuff
fourline mov font_ptr, font_part ' get address of appropriate font section
shl font_ptr, #8+2
add font_ptr, font_base
movd :pixa, #scanbuff-1 ' reset scanbuff address (pre-decremented)
movd :cola, #colorbuff-1 ' reset colorbuff address (pre-decremented)
movd :colb, #colorbuff-1
mov y, #2 ' must build scanbuff in two sections because
mov vscl, vscl_line2x ' ..pixel counter is limited to twelve bits
:halfrow waitvid underscore, #0 ' output lows to let other COG drive VGA pins
mov x, #cols/2 ' ..for 2 scan lines, ready for half a row
:column rdword z, screen_ptr ' get character and colors from screen memory
mov bg, z
and z, #$ff ' mask character code
shl z, #2 ' * 4
add z, font_ptr ' add font section address to point to 8*4 pixels
add :pixa, d0 ' increment scanbuff destination addresses
add screen_ptr, #2 ' increment screen memory address
:pixa rdlong scanbuff, z ' read pixel long (8*4) into scanbuff
ror bg, #12 ' background color in bits 3..0
mov fg, bg ' foreground color in bits 31..28
shr fg, #28 ' bits 3..0
add fg, #fg_clut ' + offset to foreground CLUT
movs :cola, fg
add :cola, d0
add bg, #bg_clut ' + offset to background CLUT
movs :colb, bg
add :colb, d0
:cola mov colorbuff, 0-0
:colb or colorbuff, 0-0
djnz x, #:column ' another character in this half-row?
djnz y, #:halfrow ' loop to do 2nd half-row, time for 2nd WAITVID
sub screen_ptr, #2*cols ' back up to start of same row in screen memory
' Insert cursors into scanbuff
mov z, #2 ' ready for two cursors
:cursor rdbyte x, cursor_base ' x in range?
add cursor_base, #1
cmp x, #cols wc
rdbyte y, cursor_base ' y match?
add cursor_base, #1
cmp y, row wz
rdbyte y, cursor_base ' get cursor mode
add cursor_base, #1
if_nc_or_nz jmp #:nocursor ' if cursor not in scanbuff, no cursor
add x, #scanbuff ' cursor in scanbuff, set scanbuff address
movd :xor, x
test y, #%010 wc ' get mode bits into flags
test y, #%001 wz
if_nc_and_z jmp #:nocursor ' if cursor disabled, no cursor
if_c_and_z test slowbit, cnt wc ' if blink mode, get blink state
if_c_and_nz test fastbit, cnt wc
test y, #%100 wz ' get box or underscore cursor piece
if_z mov x, longmask
if_nz mov x, underscore
if_nz cmp font_part, #3 wz ' if underscore, must be last font section
:xor if_nc_and_z xor scanbuff, x ' conditionally xor cursor into scanbuff
:nocursor djnz z, #:cursor ' second cursor?
sub cursor_base, #3*2 ' restore cursor base
' Display four scan lines from scanbuff
mov y, #4 ' ready for four scan lines
scanline mov vscl, vscl_chr ' set pixel rate for characters
jmp #scancode ' jump to scanbuff display routine in scancode
scanret mov vscl, #hs ' do horizontal sync pixels
waitvid hvsync, #1 ' #1 makes hsync active
mov vscl, #hb ' do horizontal back porch pixels
waitvid hvsync, #0 ' #0 makes hsync inactive
shr scanbuff+cols-1, #8 ' shift last column's pixels right by 8
djnz y, #scanline ' another scan line?
' Next group of four scan lines
add font_part, #2 ' if font_part + 2 => 4, subtract 4 (new row)
cmpsub font_part, #4 wc ' c=0 for same row, c=1 for new row
if_c add screen_ptr, #2*cols ' if new row, advance screen pointer
if_c add row, #1 ' if new row, increment row counter
djnz fours, #fourline ' another 4-line build/display?
' Visible section done, do vertical sync front porch lines
wrlong longmask,par ' write -1 to refresh indicator
vf_lines mov x,#vf ' do vertical front porch lines (# set at runtime)
call #blank
jmp #vsync ' new field, loop to vsync
' Subroutine - do blank lines
blank_vsync xor hvsync,#$101 ' flip vertical sync bits
blank mov vscl, hx ' do blank pixels
waitvid hvsync, #0
mov vscl, #hf ' do horizontal front porch pixels
waitvid hvsync, #0
mov vscl, #hs ' do horizontal sync pixels
waitvid hvsync, #1
mov vscl, #hb ' do horizontal back porch pixels
waitvid hvsync, #0
djnz x,#blank ' another line?
blank_ret
blank_vsync_ret
ret
' Data
screen_base long 0 ' set at runtime (3 contiguous longs)
cursor_base long 0 ' set at runtime
font_base long 0 ' set at runtime
font_part long 0 ' set at runtime
hx long hp ' visible pixels per scan line
vscl_line long hp + hf + hs + hb ' total number of pixels per scan line
vscl_line2x long (hp + hf + hs + hb) * 2 ' total number of pixels per 2 scan lines
vscl_chr long 1 << 12 + 8 ' 1 clock per pixel and 8 pixels per set
colormask long $FCFC ' mask to isolate R,G,B bits from H,V
longmask long $FFFFFFFF ' all bits set
slowbit long 1 << 25 ' cnt mask for slow cursor blink
fastbit long 1 << 24 ' cnt mask for fast cursor blink
underscore long $FFFF0000 ' underscore cursor pattern
hv long hv_inactive ' -H,-V states
hvsync long hv_inactive ^ $200 ' +/-H,-V states
bg_clut long %00000011_00000011 ' black
long %00000011_00001011 ' dark blue
long %00000011_00100011 ' dark green
long %00000011_00101011 ' dark cyan
long %00000011_10000011 ' dark red
long %00000011_10001011 ' dark magenta
long %00000011_10100011 ' brown
long %00000011_10101011 ' light gray
long %00000011_01010111 ' dark gray
long %00000011_00001111 ' light blue
long %00000011_00110011 ' light green
long %00000011_00111111 ' light cyan
long %00000011_11000011 ' light red
long %00000011_11001111 ' light magenta
long %00000011_11110011 ' light yellow
long %00000011_11111111 ' white
fg_clut long %00000011_00000011 ' black
long %00000111_00000011 ' dark blue
long %00010011_00000011 ' dark green
long %00010111_00000011 ' dark cyan
long %01000011_00000011 ' dark red
long %01000111_00000011 ' dark magenta
long %01010011_00000011 ' brown
long %10101011_00000011 ' light gray
long %01010111_00000011 ' dark gray
long %00001011_00000011 ' blue
long %00100011_00000011 ' green
long %00101011_00000011 ' cyan
long %10000011_00000011 ' red
long %10001011_00000011 ' magenta
long %10100011_00000011 ' yellow
long %11111111_00000011 ' white
' Uninitialized data
screen_ptr res 1
font_ptr res 1
x res 1
y res 1
z res 1
fg res 1
bg res 1
row res 1
fours res 1
fit $1f0
' 8 x 12 font - characters 0..127
'
' Each long holds four scan lines of a single character. The longs are arranged into
' groups of 128 which represent all characters (0..127). There are four groups which
' each contain a vertical part of all characters. They are ordered top, middle, and
' bottom.
font long
long $0082ba00,$00000000,$2a552a00,$36360000,$061e0000,$061c0000,$06060000,$3c000000
long $00000000,$6e660000,$66660000,$18181818,$00000000,$00000000,$18181818,$18181818
long $0000ffff,$00000000,$00000000,$00000000,$00000000,$18181818,$18181818,$18181818
long $00000000,$18181818,$60000000,$06000000,$00000000,$00000000,$38000000,$00000000
long $00000000,$18000000,$36000000,$24000000,$18000000,$4e000000,$1c000000,$18000000
long $30000000,$0c000000,$00000000,$00000000,$00000000,$00000000,$00000000,$60000000
long $18000000,$18000000,$3c000000,$7e000000,$60000000,$7e000000,$3c000000,$7e000000
long $3c000000,$3c000000,$00000000,$00000000,$60000000,$00000000,$06000000,$3c000000
long $3c000000,$3c000000,$3e000000,$3c000000,$3e000000,$7e000000,$7e000000,$3c000000
long $66000000,$7e000000,$60000000,$46000000,$06000000,$42000000,$66000000,$3c000000
long $3e000000,$3c000000,$3e000000,$3c000000,$7e000000,$66000000,$66000000,$66000000
long $42000000,$66000000,$7e000000,$3c000000,$06000000,$3c000000,$18000000,$00000000
long $180c0000,$00000000,$06000000,$00000000,$60000000,$00000000,$38000000,$00000000
long $06000000,$18000000,$60000000,$06000000,$1c000000,$00000000,$00000000,$00000000
long $00000000,$00000000,$00000000,$00000000,$00000000,$00000000,$00000000,$00000000
long $00000000,$00000000,$00000000,$38000000,$18000000,$1c000000,$4c000000,$aa55aa55
long $00000000,$00000000,$2a552a00,$36360000,$061e0000,$061c0000,$06060000,$3c000000
long $00000000,$6e660000,$66660000,$24242424,$00000000,$00000000,$24242424,$24242424
long $00ff00ff,$ff000000,$00000000,$00000000,$00000000,$24242424,$24242424,$24242424
long $00000000,$24242424,$60000000,$06000000,$00000000,$00000000,$38000000,$00000000
long $00000000,$18000000,$36000000,$24000000,$18000000,$4e000000,$1c000000,$18000000
long $30000000,$0c000000,$00000000,$00000000,$00000000,$00000000,$00000000,$60000000
long $18000000,$18000000,$3c000000,$7e000000,$60000000,$7e000000,$3c000000,$7e000000
long $3c000000,$3c000000,$00000000,$00000000,$60000000,$00000000,$06000000,$3c000000
long $3c000000,$3c000000,$3e000000,$3c000000,$3e000000,$7e000000,$7e000000,$3c000000
long $66000000,$7e000000,$60000000,$46000000,$06000000,$42000000,$66000000,$3c000000
long $3e000000,$3c000000,$3e000000,$3c000000,$7e000000,$66000000,$66000000,$66000000
long $42000000,$66000000,$7e000000,$3c000000,$06000000,$3c000000,$18000000,$00000000
long $180c0000,$00000000,$06000000,$00000000,$60000000,$00000000,$38000000,$00000000
long $06000000,$18000000,$60000000,$06000000,$1c000000,$00000000,$00000000,$00000000
long $00000000,$00000000,$00000000,$00000000,$00000000,$00000000,$00000000,$00000000
long $00000000,$00000000,$00000000,$38000000,$18000000,$1c000000,$4c000000,$aa55aa55
long $82008282,$3c180000,$2a552a55,$0036363e,$0006060e,$001c0606,$001e0606,$003c6666
long $187e1818,$0066767e,$00183c24,$1f181818,$1f000000,$f8000000,$f8181818,$ff181818
long $00000000,$0000ffff,$00000000,$00000000,$00000000,$f8181818,$1f181818,$ff181818
long $ff000000,$18181818,$0c060c30,$3060300c,$667e0000,$187e3030,$3e0c0c6c,$18180000
long $00000000,$18181818,$00003636,$247e7e24,$3c1a5a3c,$18302e6a,$1c363636,$00181818
long $0c0c1818,$30301818,$7e182400,$7e181800,$00000000,$00000000,$00000000,$18303060
long $66666624,$18181a1c,$38606666,$3c183060,$666c7870,$663e0606,$3e060666,$30306060
long $3c666666,$7c666666,$183c1800,$183c1800,$060c1830,$007e0000,$6030180c,$38606666
long $6a7a6262,$7e666666,$3e666666,$06060666,$66666666,$3e060606,$3e060606,$76060666
long $7e666666,$18181818,$60606060,$0e1e3666,$06060606,$667e7e66,$7e6e6e66,$66666666
long $3e666666,$66666666,$3e666666,$3c060666,$18181818,$66666666,$24246666,$66666666
long $183c2466,$183c3c66,$18306060,$0c0c0c0c,$180c0c06,$30303030,$0042663c,$00000000
long $00000030,$603c0000,$663e0606,$663c0000,$667c6060,$663c0000,$1e0c0c6c,$665c0000
long $663e0606,$181c0018,$60600060,$36660606,$18181818,$fe6a0000,$663e0000,$663c0000
long $663e0000,$667c0000,$663e0000,$663c0000,$0c3e0c0c,$66660000,$66660000,$66660000
long $66660000,$66660000,$607e0000,$0c180c0c,$18181818,$30183030,$0000327e,$aa55aa55
long $00000000,$3c180000,$2a552a55,$0036363e,$0006060e,$001c0606,$001e0606,$003c6666
long $187e1818,$0066767e,$00183c24,$20272424,$203f0000,$04fc0000,$04e42424,$00e72424
long $00000000,$0000ff00,$ff000000,$00000000,$00000000,$04e42424,$20272424,$00e72424
long $00ff0000,$24242424,$0c060c30,$3060300c,$667e0000,$187e3030,$3e0c0c6c,$18180000
long $00000000,$18181818,$00003636,$247e7e24,$3c1a5a3c,$18302e6a,$1c363636,$00181818
long $0c0c1818,$30301818,$7e182400,$7e181800,$00000000,$00000000,$00000000,$18303060
long $66666624,$18181a1c,$38606666,$3c183060,$666c7870,$663e0606,$3e060666,$30306060
long $3c666666,$7c666666,$183c1800,$183c1800,$060c1830,$007e0000,$6030180c,$38606666
long $76766666,$7e666666,$3e666666,$06060666,$66666666,$3e060606,$3e060606,$76060666
long $7e666666,$18181818,$60606060,$0e1e3666,$06060606,$667e7e66,$7e6e6e66,$66666666
long $3e666666,$66666666,$3e666666,$3c060666,$18181818,$66666666,$24246666,$66666666
long $183c2466,$183c3c66,$18306060,$0c0c0c0c,$180c0c06,$30303030,$0042663c,$00000000
long $00000030,$603c0000,$663e0606,$663c0000,$667c6060,$663c0000,$1e0c0c6c,$665c0000
long $663e0606,$181c0018,$60600060,$36660606,$18181818,$fe6a0000,$663e0000,$663c0000
long $663e0000,$667c0000,$663e0000,$663c0000,$0c3e0c0c,$66660000,$66660000,$66660000
long $66660000,$66660000,$607e0000,$0c180c0c,$18181818,$30183030,$0000327e,$aa55aa55
long $82820082,$00183c7e,$2a552a55,$30303078,$18381878,$58385838,$18381878,$00000000
long $007e0018,$18181818,$30303078,$0000001f,$1818181f,$181818f8,$000000f8,$181818ff
long $00000000,$00000000,$0000ffff,$ff000000,$00000000,$181818f8,$1818181f,$000000ff
long $181818ff,$18181818,$7e006030,$7e00060c,$66666666,$0c0c7e18,$3a6c0c0c,$00000000
long $00000000,$18180018,$00000000,$24247e7e,$183c5a58,$7256740c,$5c367656,$00000000
long $3018180c,$0c181830,$0024187e,$0018187e,$18383800,$0000007e,$3c180000,$06060c0c
long $18246666,$7e181818,$7e06060c,$3c666060,$60607e66,$3c666060,$3c666666,$0c0c1818
long $3c666666,$3c666060,$3c180000,$18383800,$6030180c,$00007e00,$060c1830,$18180018
long $3c62027a,$66666666,$3e666666,$3c660606,$3e666666,$7e060606,$06060606,$7c666666
long $66666666,$7e181818,$3c666060,$4666361e,$7e060606,$66666666,$66667676,$3c666666
long $06060606,$3c766e66,$4666361e,$3c666060,$18181818,$3c666666,$1818183c,$42667e7e
long $4266243c,$18181818,$7e06060c,$3c0c0c0c,$60603030,$3c303030,$00000000,$fe000000
long $00000000,$7c66667c,$3e666666,$3c660606,$7c666666,$3c66067e,$0c0c0c0c,$3c063c66
long $66666666,$7e181818,$60606060,$66361e1e,$7e181818,$c6c6d6d6,$66666666,$3c666666
long $063e6666,$607c6666,$06060606,$3c66300c,$386c0c0c,$7c666666,$183c3c66,$247e7e66
long $66663c3c,$607c6666,$7e060c30,$380c0c18,$18181818,$1c303018,$00000000,$aa55aa55
long $00000000,$00183c7e,$2a552a55,$30303078,$18381878,$58385838,$18381878,$00000000
long $007e0018,$18181818,$30303078,$00003f20,$24242720,$2424e404,$0000fc04,$2424e700
long $00000000,$00000000,$0000ff00,$00ff0000,$00000000,$2424e404,$24242720,$0000ff00
long $2424e700,$24242424,$7e006030,$7e00060c,$66666666,$0c0c7e18,$3a6c0c0c,$00000000
long $00000000,$18180018,$00000000,$24247e7e,$183c5a58,$7256740c,$5c367656,$00000000
long $3018180c,$0c181830,$0024187e,$0018187e,$18383800,$0000007e,$3c180000,$06060c0c
long $18246666,$7e181818,$7e06060c,$3c666060,$60607e66,$3c666060,$3c666666,$0c0c1818
long $3c666666,$3c666060,$3c180000,$18383800,$6030180c,$00007e00,$060c1830,$18180018
long $3c660676,$66666666,$3e666666,$3c660606,$3e666666,$7e060606,$06060606,$7c666666
long $66666666,$7e181818,$3c666060,$4666361e,$7e060606,$66666666,$66667676,$3c666666
long $06060606,$3c766e66,$4666361e,$3c666060,$18181818,$3c666666,$1818183c,$42667e7e
long $4266243c,$18181818,$7e06060c,$3c0c0c0c,$60603030,$3c303030,$00000000,$fe000000
long $00000000,$7c66667c,$3e666666,$3c660606,$7c666666,$3c66067e,$0c0c0c0c,$3c063c66
long $66666666,$7e181818,$60606060,$66361e1e,$7e181818,$c6c6d6d6,$66666666,$3c666666
long $063e6666,$607c6666,$06060606,$3c66300c,$386c0c0c,$7c666666,$183c3c66,$247e7e66
long $66663c3c,$607c6666,$7e060c30,$380c0c18,$18181818,$1c303018,$00000000,$aa55aa55
long $00ba8200,$00000000,$00002a55,$00000030,$00000018,$00000058,$00000018,$00000000
long $00000000,$00000078,$00000030,$00000000,$18181818,$18181818,$00000000,$18181818
long $00000000,$00000000,$00000000,$000000ff,$ffff0000,$18181818,$18181818,$00000000
long $18181818,$18181818,$00000000,$00000000,$00000000,$00000000,$00000000,$00000000
long $00000000,$00000000,$00000000,$00000000,$00000000,$00000000,$00000000,$00000000
long $00000000,$00000000,$00000000,$00000000,$0000000c,$00000000,$00000018,$00000000
long $00000000,$00000000,$00000000,$00000000,$00000000,$00000000,$00000000,$00000000
long $00000000,$00000000,$00000018,$0000000c,$00000000,$00000000,$00000000,$00000000
long $00000000,$00000000,$00000000,$00000000,$00000000,$00000000,$00000000,$00000000
long $00000000,$00000000,$00000000,$00000000,$00000000,$00000000,$00000000,$00000000
long $00000000,$00000060,$00000000,$00000000,$00000000,$00000000,$00000000,$00000000
long $00000000,$00000000,$00000000,$00000000,$00000000,$00000000,$00000000,$000000fe
long $00000000,$00000000,$00000000,$00000000,$00000000,$00000000,$00000000,$00003c66
long $00000000,$00000000,$00003c66,$00000000,$00000000,$00000000,$00000000,$00000000
long $00000606,$00006060,$00000000,$00000000,$00000000,$00000000,$00000000,$00000000
long $00000000,$00003c66,$00000000,$00000000,$00000000,$00000000,$00000000,$aa55aa55
long $ff000000,$ff000000,$ff002a55,$ff000030,$ff000018,$ff000058,$ff000018,$ff000000
long $ff000000,$ff000078,$ff000030,$00000000,$24242424,$24242424,$00000000,$24242424
long $00000000,$00000000,$00000000,$000000ff,$ff00ff00,$24242424,$24242424,$00000000
long $24242424,$24242424,$ff000000,$ff000000,$ff000000,$ff000000,$ff000000,$ff000000
long $ff000000,$ff000000,$ff000000,$ff000000,$ff000000,$ff000000,$ff000000,$ff000000
long $ff000000,$ff000000,$ff000000,$ff000000,$ff00000c,$ff000000,$ff000018,$ff000000
long $ff000000,$ff000000,$ff000000,$ff000000,$ff000000,$ff000000,$ff000000,$ff000000
long $ff000000,$ff000000,$ff000018,$ff00000c,$ff000000,$ff000000,$ff000000,$ff000000
long $ff000000,$ff000000,$ff000000,$ff000000,$ff000000,$ff000000,$ff000000,$ff000000
long $ff000000,$ff000000,$ff000000,$ff000000,$ff000000,$ff000000,$ff000000,$ff000000
long $ff000000,$ff000060,$ff000000,$ff000000,$ff000000,$ff000000,$ff000000,$ff000000
long $ff000000,$ff000000,$ff000000,$ff000000,$ff000000,$ff000000,$ff000000,$ff0000fe
long $ff000000,$ff000000,$ff000000,$ff000000,$ff000000,$ff000000,$ff000000,$ff003c66
long $ff000000,$ff000000,$ff003c66,$ff000000,$ff000000,$ff000000,$ff000000,$ff000000
long $ff000606,$ff006060,$ff000000,$ff000000,$ff000000,$ff000000,$ff000000,$ff000000
long $ff000000,$ff003c66,$ff000000,$ff000000,$ff000000,$ff000000,$ff000000,$ff55aa55
{{
+------------------------------------------------------------------------------------------------------------------------------+
| TERMS OF USE: Parallax Object Exchange License |
+------------------------------------------------------------------------------------------------------------------------------+
|Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation | |files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, |
|modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software|
|is furnished to do so, subject to the following conditions: |
| |
|The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.|
| |
|THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE |
|WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR |
|COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, |
|ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
+------------------------------------------------------------------------------------------------------------------------------+
}}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,102 @@
CON
_xinfreq = 5_000_000 ' Quartz is 5MHz
_clkmode = xtal1 + pll16x ' System clock is 80MHz
#define DracBladeProp
CHAR_W = 80
CHAR_H = 30
OBJ
' vga : "vga8x8d"
vga : "vgacolour"
vt100 : "vt100"
VAR
long params[6]
long seed
PUB main
vga.start(16, @screen, @cursor, @sync)
params[0] := @command
params[1] := @screen
params[2] := @cursor
params[3] := @sync
params[4] := CHAR_W
params[5] := CHAR_H
vt100.start(@params)
seed := cnt
str(string(27,"[2;34m",27,"[2J",27,"[H","Hello World!",13,10))
str(string(27,"[7m","Inverse on",13,10))
str(string(27,"[27m","Inverse off",13,10))
str(string(27,"[1m","Highlite on",13,10))
str(string(27,"[2m","Highlite off",13,10))
str(string(27,"[4m","Underline on ",27,"[1m + highlite ",27,"[2m",27,"[7m + inverse ",27,"[0m all off + default color.",13,10))
str(string(27,"[40m","BGD 0"))
str(string(27,"[41m","BGD 1"))
str(string(27,"[42m","BGD 2"))
str(string(27,"[43m","BGD 3"))
str(string(27,"[44m","BGD 4"))
str(string(27,"[45m","BGD 5"))
str(string(27,"[46m","BGD 6"))
str(string(27,"[47m","BGD 7",13,10))
str(string(27,"[41m"))
str(string(27,"[30m","FGD 0"))
str(string(27,"[31m","FGD 1"))
str(string(27,"[32m","FGD 2"))
str(string(27,"[33m","FGD 3"))
str(string(27,"[34m","FGD 4"))
str(string(27,"[35m","FGD 5"))
str(string(27,"[36m","FGD 6"))
str(string(27,"[37m","FGD 7",13,10))
str(string(27,"[1;40m"))
str(string(27,"[30m","FGD 0"))
str(string(27,"[31m","FGD 1"))
str(string(27,"[32m","FGD 2"))
str(string(27,"[33m","FGD 3"))
str(string(27,"[34m","FGD 4"))
str(string(27,"[35m","FGD 5"))
str(string(27,"[36m","FGD 6"))
str(string(27,"[37m","FGD 7",13,10))
str(string(27,"[2m","The quick brown fox jumps over the lazy dog.", 13, 10))
str(string("Setting a scroll range below here.",13,10))
str(string(27,"[24H","This part of the screen remains ",27,"[4mstatic",27,"[24m, since it is below the scrolling region."))
str(string(27,"[12;23r",27,"[41m"))
repeat
chr(27)
chr("[")
chr("3")
chr("0" + rand & 7)
chr("m")
chr(27)
chr("[")
chr("4")
chr("0" + rand & 7)
chr("m")
str(string("Four score and seven years ago our ",27,"[1mfathers",27,"[2m brought forth, upon this continent, a new ",27,"[1mnation",27,"[2m, conceived in Liberty, and dedicated to the proposition that all men are created equal. "))
waitcnt(clkfreq/4 + cnt)
PUB chr(ch)
command := $100 | ch
repeat while command
PUB str(strptr) | i
repeat i from 0 to strsize(strptr)
chr(byte[strptr][i])
PUB rand
seed := seed * 1103515245 + 12345 + CNT / 7777
return seed
DAT
command long 0
screen word $0720[CHAR_W*CHAR_H]
cursor byte 0,0,%110,0,0,0,0,0
sync long 0

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@@ -0,0 +1 @@
{{

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More