- reorganized project directory structure master
authorJohn Tsiombikas <nuclear@member.fsf.org>
Fri, 1 May 2020 03:18:46 +0000 (06:18 +0300)
committerJohn Tsiombikas <nuclear@member.fsf.org>
Fri, 1 May 2020 03:18:46 +0000 (06:18 +0300)
- merged ROM monitor code
- merged emulator
- expanded README and added license files

33 files changed:
.gitignore
LICENSE.hw [new file with mode: 0644]
LICENSE.sw [new file with mode: 0644]
Makefile [deleted file]
README.md
emu/Makefile [new file with mode: 0644]
emu/src/cpu.c [new file with mode: 0644]
emu/src/cpu.h [new file with mode: 0644]
emu/src/duart.c [new file with mode: 0644]
emu/src/duart.h [new file with mode: 0644]
emu/src/emu.c [new file with mode: 0644]
emu/src/emu.h [new file with mode: 0644]
emu/src/main.c [new file with mode: 0644]
glue.jed [deleted file]
glue.pld [deleted file]
hw/Makefile [new file with mode: 0644]
hw/glue.jed [new file with mode: 0644]
hw/glue.pld [new file with mode: 0644]
hw/sym-lib-table [new file with mode: 0644]
hw/z80comp2-cache.lib [new file with mode: 0644]
hw/z80comp2.kicad_pcb [new file with mode: 0644]
hw/z80comp2.lib [new file with mode: 0644]
hw/z80comp2.pro [new file with mode: 0644]
hw/z80comp2.sch [new file with mode: 0644]
rom/Makefile [new file with mode: 0644]
rom/monitor.asm [new file with mode: 0644]
rom/uart.inc [new file with mode: 0644]
sym-lib-table [deleted file]
z80comp2-cache.lib [deleted file]
z80comp2.kicad_pcb [deleted file]
z80comp2.lib [deleted file]
z80comp2.pro [deleted file]
z80comp2.sch [deleted file]

index b9f3525..eeb0f87 100644 (file)
@@ -1,3 +1,5 @@
+*.o
+*.d
 *.swp
 *.chp
 *.fus
 *.swp
 *.chp
 *.fus
@@ -6,3 +8,6 @@
 *.pdf
 *.sch-bak
 *.dcm
 *.pdf
 *.sch-bak
 *.dcm
+rom/monitor
+*.lst
+emu/z80v2emu
diff --git a/LICENSE.hw b/LICENSE.hw
new file mode 100644 (file)
index 0000000..fd662a7
--- /dev/null
@@ -0,0 +1,428 @@
+Attribution-ShareAlike 4.0 International
+
+=======================================================================
+
+Creative Commons Corporation ("Creative Commons") is not a law firm and
+does not provide legal services or legal advice. Distribution of
+Creative Commons public licenses does not create a lawyer-client or
+other relationship. Creative Commons makes its licenses and related
+information available on an "as-is" basis. Creative Commons gives no
+warranties regarding its licenses, any material licensed under their
+terms and conditions, or any related information. Creative Commons
+disclaims all liability for damages resulting from their use to the
+fullest extent possible.
+
+Using Creative Commons Public Licenses
+
+Creative Commons public licenses provide a standard set of terms and
+conditions that creators and other rights holders may use to share
+original works of authorship and other material subject to copyright
+and certain other rights specified in the public license below. The
+following considerations are for informational purposes only, are not
+exhaustive, and do not form part of our licenses.
+
+     Considerations for licensors: Our public licenses are
+     intended for use by those authorized to give the public
+     permission to use material in ways otherwise restricted by
+     copyright and certain other rights. Our licenses are
+     irrevocable. Licensors should read and understand the terms
+     and conditions of the license they choose before applying it.
+     Licensors should also secure all rights necessary before
+     applying our licenses so that the public can reuse the
+     material as expected. Licensors should clearly mark any
+     material not subject to the license. This includes other CC-
+     licensed material, or material used under an exception or
+     limitation to copyright. More considerations for licensors:
+       wiki.creativecommons.org/Considerations_for_licensors
+
+     Considerations for the public: By using one of our public
+     licenses, a licensor grants the public permission to use the
+     licensed material under specified terms and conditions. If
+     the licensor's permission is not necessary for any reason--for
+     example, because of any applicable exception or limitation to
+     copyright--then that use is not regulated by the license. Our
+     licenses grant only permissions under copyright and certain
+     other rights that a licensor has authority to grant. Use of
+     the licensed material may still be restricted for other
+     reasons, including because others have copyright or other
+     rights in the material. A licensor may make special requests,
+     such as asking that all changes be marked or described.
+     Although not required by our licenses, you are encouraged to
+     respect those requests where reasonable. More_considerations
+     for the public: 
+       wiki.creativecommons.org/Considerations_for_licensees
+
+=======================================================================
+
+Creative Commons Attribution-ShareAlike 4.0 International Public
+License
+
+By exercising the Licensed Rights (defined below), You accept and agree
+to be bound by the terms and conditions of this Creative Commons
+Attribution-ShareAlike 4.0 International Public License ("Public
+License"). To the extent this Public License may be interpreted as a
+contract, You are granted the Licensed Rights in consideration of Your
+acceptance of these terms and conditions, and the Licensor grants You
+such rights in consideration of benefits the Licensor receives from
+making the Licensed Material available under these terms and
+conditions.
+
+
+Section 1 -- Definitions.
+
+  a. Adapted Material means material subject to Copyright and Similar
+     Rights that is derived from or based upon the Licensed Material
+     and in which the Licensed Material is translated, altered,
+     arranged, transformed, or otherwise modified in a manner requiring
+     permission under the Copyright and Similar Rights held by the
+     Licensor. For purposes of this Public License, where the Licensed
+     Material is a musical work, performance, or sound recording,
+     Adapted Material is always produced where the Licensed Material is
+     synched in timed relation with a moving image.
+
+  b. Adapter's License means the license You apply to Your Copyright
+     and Similar Rights in Your contributions to Adapted Material in
+     accordance with the terms and conditions of this Public License.
+
+  c. BY-SA Compatible License means a license listed at
+     creativecommons.org/compatiblelicenses, approved by Creative
+     Commons as essentially the equivalent of this Public License.
+
+  d. Copyright and Similar Rights means copyright and/or similar rights
+     closely related to copyright including, without limitation,
+     performance, broadcast, sound recording, and Sui Generis Database
+     Rights, without regard to how the rights are labeled or
+     categorized. For purposes of this Public License, the rights
+     specified in Section 2(b)(1)-(2) are not Copyright and Similar
+     Rights.
+
+  e. Effective Technological Measures means those measures that, in the
+     absence of proper authority, may not be circumvented under laws
+     fulfilling obligations under Article 11 of the WIPO Copyright
+     Treaty adopted on December 20, 1996, and/or similar international
+     agreements.
+
+  f. Exceptions and Limitations means fair use, fair dealing, and/or
+     any other exception or limitation to Copyright and Similar Rights
+     that applies to Your use of the Licensed Material.
+
+  g. License Elements means the license attributes listed in the name
+     of a Creative Commons Public License. The License Elements of this
+     Public License are Attribution and ShareAlike.
+
+  h. Licensed Material means the artistic or literary work, database,
+     or other material to which the Licensor applied this Public
+     License.
+
+  i. Licensed Rights means the rights granted to You subject to the
+     terms and conditions of this Public License, which are limited to
+     all Copyright and Similar Rights that apply to Your use of the
+     Licensed Material and that the Licensor has authority to license.
+
+  j. Licensor means the individual(s) or entity(ies) granting rights
+     under this Public License.
+
+  k. Share means to provide material to the public by any means or
+     process that requires permission under the Licensed Rights, such
+     as reproduction, public display, public performance, distribution,
+     dissemination, communication, or importation, and to make material
+     available to the public including in ways that members of the
+     public may access the material from a place and at a time
+     individually chosen by them.
+
+  l. Sui Generis Database Rights means rights other than copyright
+     resulting from Directive 96/9/EC of the European Parliament and of
+     the Council of 11 March 1996 on the legal protection of databases,
+     as amended and/or succeeded, as well as other essentially
+     equivalent rights anywhere in the world.
+
+  m. You means the individual or entity exercising the Licensed Rights
+     under this Public License. Your has a corresponding meaning.
+
+
+Section 2 -- Scope.
+
+  a. License grant.
+
+       1. Subject to the terms and conditions of this Public License,
+          the Licensor hereby grants You a worldwide, royalty-free,
+          non-sublicensable, non-exclusive, irrevocable license to
+          exercise the Licensed Rights in the Licensed Material to:
+
+            a. reproduce and Share the Licensed Material, in whole or
+               in part; and
+
+            b. produce, reproduce, and Share Adapted Material.
+
+       2. Exceptions and Limitations. For the avoidance of doubt, where
+          Exceptions and Limitations apply to Your use, this Public
+          License does not apply, and You do not need to comply with
+          its terms and conditions.
+
+       3. Term. The term of this Public License is specified in Section
+          6(a).
+
+       4. Media and formats; technical modifications allowed. The
+          Licensor authorizes You to exercise the Licensed Rights in
+          all media and formats whether now known or hereafter created,
+          and to make technical modifications necessary to do so. The
+          Licensor waives and/or agrees not to assert any right or
+          authority to forbid You from making technical modifications
+          necessary to exercise the Licensed Rights, including
+          technical modifications necessary to circumvent Effective
+          Technological Measures. For purposes of this Public License,
+          simply making modifications authorized by this Section 2(a)
+          (4) never produces Adapted Material.
+
+       5. Downstream recipients.
+
+            a. Offer from the Licensor -- Licensed Material. Every
+               recipient of the Licensed Material automatically
+               receives an offer from the Licensor to exercise the
+               Licensed Rights under the terms and conditions of this
+               Public License.
+
+            b. Additional offer from the Licensor -- Adapted Material.
+               Every recipient of Adapted Material from You
+               automatically receives an offer from the Licensor to
+               exercise the Licensed Rights in the Adapted Material
+               under the conditions of the Adapter's License You apply.
+
+            c. No downstream restrictions. You may not offer or impose
+               any additional or different terms or conditions on, or
+               apply any Effective Technological Measures to, the
+               Licensed Material if doing so restricts exercise of the
+               Licensed Rights by any recipient of the Licensed
+               Material.
+
+       6. No endorsement. Nothing in this Public License constitutes or
+          may be construed as permission to assert or imply that You
+          are, or that Your use of the Licensed Material is, connected
+          with, or sponsored, endorsed, or granted official status by,
+          the Licensor or others designated to receive attribution as
+          provided in Section 3(a)(1)(A)(i).
+
+  b. Other rights.
+
+       1. Moral rights, such as the right of integrity, are not
+          licensed under this Public License, nor are publicity,
+          privacy, and/or other similar personality rights; however, to
+          the extent possible, the Licensor waives and/or agrees not to
+          assert any such rights held by the Licensor to the limited
+          extent necessary to allow You to exercise the Licensed
+          Rights, but not otherwise.
+
+       2. Patent and trademark rights are not licensed under this
+          Public License.
+
+       3. To the extent possible, the Licensor waives any right to
+          collect royalties from You for the exercise of the Licensed
+          Rights, whether directly or through a collecting society
+          under any voluntary or waivable statutory or compulsory
+          licensing scheme. In all other cases the Licensor expressly
+          reserves any right to collect such royalties.
+
+
+Section 3 -- License Conditions.
+
+Your exercise of the Licensed Rights is expressly made subject to the
+following conditions.
+
+  a. Attribution.
+
+       1. If You Share the Licensed Material (including in modified
+          form), You must:
+
+            a. retain the following if it is supplied by the Licensor
+               with the Licensed Material:
+
+                 i. identification of the creator(s) of the Licensed
+                    Material and any others designated to receive
+                    attribution, in any reasonable manner requested by
+                    the Licensor (including by pseudonym if
+                    designated);
+
+                ii. a copyright notice;
+
+               iii. a notice that refers to this Public License;
+
+                iv. a notice that refers to the disclaimer of
+                    warranties;
+
+                 v. a URI or hyperlink to the Licensed Material to the
+                    extent reasonably practicable;
+
+            b. indicate if You modified the Licensed Material and
+               retain an indication of any previous modifications; and
+
+            c. indicate the Licensed Material is licensed under this
+               Public License, and include the text of, or the URI or
+               hyperlink to, this Public License.
+
+       2. You may satisfy the conditions in Section 3(a)(1) in any
+          reasonable manner based on the medium, means, and context in
+          which You Share the Licensed Material. For example, it may be
+          reasonable to satisfy the conditions by providing a URI or
+          hyperlink to a resource that includes the required
+          information.
+
+       3. If requested by the Licensor, You must remove any of the
+          information required by Section 3(a)(1)(A) to the extent
+          reasonably practicable.
+
+  b. ShareAlike.
+
+     In addition to the conditions in Section 3(a), if You Share
+     Adapted Material You produce, the following conditions also apply.
+
+       1. The Adapter's License You apply must be a Creative Commons
+          license with the same License Elements, this version or
+          later, or a BY-SA Compatible License.
+
+       2. You must include the text of, or the URI or hyperlink to, the
+          Adapter's License You apply. You may satisfy this condition
+          in any reasonable manner based on the medium, means, and
+          context in which You Share Adapted Material.
+
+       3. You may not offer or impose any additional or different terms
+          or conditions on, or apply any Effective Technological
+          Measures to, Adapted Material that restrict exercise of the
+          rights granted under the Adapter's License You apply.
+
+
+Section 4 -- Sui Generis Database Rights.
+
+Where the Licensed Rights include Sui Generis Database Rights that
+apply to Your use of the Licensed Material:
+
+  a. for the avoidance of doubt, Section 2(a)(1) grants You the right
+     to extract, reuse, reproduce, and Share all or a substantial
+     portion of the contents of the database;
+
+  b. if You include all or a substantial portion of the database
+     contents in a database in which You have Sui Generis Database
+     Rights, then the database in which You have Sui Generis Database
+     Rights (but not its individual contents) is Adapted Material,
+
+     including for purposes of Section 3(b); and
+  c. You must comply with the conditions in Section 3(a) if You Share
+     all or a substantial portion of the contents of the database.
+
+For the avoidance of doubt, this Section 4 supplements and does not
+replace Your obligations under this Public License where the Licensed
+Rights include other Copyright and Similar Rights.
+
+
+Section 5 -- Disclaimer of Warranties and Limitation of Liability.
+
+  a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
+     EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
+     AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
+     ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
+     IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
+     WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
+     PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
+     ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
+     KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
+     ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
+
+  b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
+     TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
+     NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
+     INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
+     COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
+     USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
+     ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
+     DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
+     IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
+
+  c. The disclaimer of warranties and limitation of liability provided
+     above shall be interpreted in a manner that, to the extent
+     possible, most closely approximates an absolute disclaimer and
+     waiver of all liability.
+
+
+Section 6 -- Term and Termination.
+
+  a. This Public License applies for the term of the Copyright and
+     Similar Rights licensed here. However, if You fail to comply with
+     this Public License, then Your rights under this Public License
+     terminate automatically.
+
+  b. Where Your right to use the Licensed Material has terminated under
+     Section 6(a), it reinstates:
+
+       1. automatically as of the date the violation is cured, provided
+          it is cured within 30 days of Your discovery of the
+          violation; or
+
+       2. upon express reinstatement by the Licensor.
+
+     For the avoidance of doubt, this Section 6(b) does not affect any
+     right the Licensor may have to seek remedies for Your violations
+     of this Public License.
+
+  c. For the avoidance of doubt, the Licensor may also offer the
+     Licensed Material under separate terms or conditions or stop
+     distributing the Licensed Material at any time; however, doing so
+     will not terminate this Public License.
+
+  d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
+     License.
+
+
+Section 7 -- Other Terms and Conditions.
+
+  a. The Licensor shall not be bound by any additional or different
+     terms or conditions communicated by You unless expressly agreed.
+
+  b. Any arrangements, understandings, or agreements regarding the
+     Licensed Material not stated herein are separate from and
+     independent of the terms and conditions of this Public License.
+
+
+Section 8 -- Interpretation.
+
+  a. For the avoidance of doubt, this Public License does not, and
+     shall not be interpreted to, reduce, limit, restrict, or impose
+     conditions on any use of the Licensed Material that could lawfully
+     be made without permission under this Public License.
+
+  b. To the extent possible, if any provision of this Public License is
+     deemed unenforceable, it shall be automatically reformed to the
+     minimum extent necessary to make it enforceable. If the provision
+     cannot be reformed, it shall be severed from this Public License
+     without affecting the enforceability of the remaining terms and
+     conditions.
+
+  c. No term or condition of this Public License will be waived and no
+     failure to comply consented to unless expressly agreed to by the
+     Licensor.
+
+  d. Nothing in this Public License constitutes or may be interpreted
+     as a limitation upon, or waiver of, any privileges and immunities
+     that apply to the Licensor or You, including from the legal
+     processes of any jurisdiction or authority.
+
+
+=======================================================================
+
+Creative Commons is not a party to its public
+licenses. Notwithstanding, Creative Commons may elect to apply one of
+its public licenses to material it publishes and in those instances
+will be considered the “Licensor.” The text of the Creative Commons
+public licenses is dedicated to the public domain under the CC0 Public
+Domain Dedication. Except for the limited purpose of indicating that
+material is shared under a Creative Commons public license or as
+otherwise permitted by the Creative Commons policies published at
+creativecommons.org/policies, Creative Commons does not authorize the
+use of the trademark "Creative Commons" or any other trademark or logo
+of Creative Commons without its prior written consent including,
+without limitation, in connection with any unauthorized modifications
+to any of its public licenses or any other arrangements,
+understandings, or agreements concerning use of licensed material. For
+the avoidance of doubt, this paragraph does not form part of the
+public licenses.
+
+Creative Commons may be contacted at creativecommons.org.
+
diff --git a/LICENSE.sw b/LICENSE.sw
new file mode 100644 (file)
index 0000000..94a9ed0
--- /dev/null
@@ -0,0 +1,674 @@
+                    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>.
diff --git a/Makefile b/Makefile
deleted file mode 100644 (file)
index 3b18b75..0000000
--- a/Makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-glue.jed: glue.pld
-
-%.jed: %.pld
-       galasm $<
-
-.PHONY: program
-program: glue.jed
-       minipro -p ATF16V8B -c config -w $<
index ea74067..c2c153f 100644 (file)
--- a/README.md
+++ b/README.md
@@ -1,8 +1,32 @@
-Z80 micro 2
-===========
-This is a simple Z80 computer:
+Z80 computer v2
+===============
+
+About
+-----
+This is a simple Z80 computer. Hopefully I'll find a better name for it.
  - 3.6864 MHz clock (see mc68681 DUART)
  - 64kb RAM (32kb accessible at any single time)
  - 32kb ROM
  - Dual serial UART (mc68681) with CTS/RTS flow control (1x RS232, 1x TTL-level)
  - Glue logic implemented in a ATF16V8 GAL (glue.pld)
  - 3.6864 MHz clock (see mc68681 DUART)
  - 64kb RAM (32kb accessible at any single time)
  - 32kb ROM
  - Dual serial UART (mc68681) with CTS/RTS flow control (1x RS232, 1x TTL-level)
  - Glue logic implemented in a ATF16V8 GAL (glue.pld)
+
+Directory structure:
+ - `hw/`: hardware design files, schematic, and GAL equations
+ - `rom/`: source code of the ROM monitor program
+ - `emu/`: system emulator
+
+License
+-------
+Copyright (C) 2020 John Tsiombikas <nuclear@member.fsf.org>
+
+Hardware designs are open hardware, released under the terms of the Creative
+Commons Attribution Share-Alike license (CC BY-SA). See `LICENSE.hw` for
+details.
+
+All software and firmware in this project is free software, released under the
+terms of the GNU General Public License v3, or at your option any later version
+published by the Free Software Foundation. See `LICENSE.sw` for details.
+
+In short you are free to use, reproduce, modify, and/or redistribute any part of
+this project, provided you also extend the same freedom, under the same terms,
+to anyone receiving this, or any derivative work based on this, from you.
diff --git a/emu/Makefile b/emu/Makefile
new file mode 100644 (file)
index 0000000..d0a5af4
--- /dev/null
@@ -0,0 +1,15 @@
+src = $(wildcard src/*.c)
+obj = $(src:.c=.o)
+dep = $(obj:.o=.d)
+bin = z80v2emu
+
+CFLAGS = -pedantic -Wall -g -MMD
+
+$(bin): $(obj)
+       $(CC) -o $@ $(obj) $(LDFLAGS)
+
+-include $(dep)
+
+.PHONY: clean
+clean:
+       rm -f $(obj) $(bin)
diff --git a/emu/src/cpu.c b/emu/src/cpu.c
new file mode 100644 (file)
index 0000000..ce24dcc
--- /dev/null
@@ -0,0 +1,784 @@
+#include <stdint.h>
+#include "cpu.h"
+#include "emu.h"
+
+enum {
+       FLAGS_C         = 0x01,
+       FLAGS_N         = 0x02,
+       FLAGS_PV        = 0x04,
+       FLAGS_H         = 0x10,
+       FLAGS_Z         = 0x40,
+       FLAGS_S         = 0x80
+};
+
+enum {
+       R_B     = 0,
+       R_C     = 1,
+       R_D     = 2,
+       R_E     = 3,
+       R_H     = 4,
+       R_L     = 5,
+       R_INVAL = 6,
+       R_A     = 7
+};
+
+#define RRSET2 4
+enum {
+       RR_BC = 0,
+       RR_DE = 1,
+       RR_HL = 2,
+       RR_SP = 3,
+
+       RR2_BC = RRSET2 | RR_BC,
+       RR2_DE = RRSET2 | RR_DE,
+       RR2_HL = RRSET2 | RR_HL,
+       RR2_AF = RRSET2 | RR_SP
+};
+
+enum {
+       PREFIX_ED       = 1,
+       PREFIX_CB       = 2,
+       PREFIX_DD       = 4,
+       PREFIX_FD       = 8
+};
+
+enum {
+       ALUOP_ADD       = 0,
+       ALUOP_ADC       = 1,
+       ALUOP_SUB       = 2,
+       ALUOP_SBC       = 3,
+       ALUOP_AND       = 4,
+       ALUOP_XOR       = 5,
+       ALUOP_OR        = 6,
+       ALUOP_CP        = 7
+};
+
+enum {
+       CC_NZ   = 0,
+       CC_Z    = 1,
+       CC_NC   = 2,
+       CC_C    = 3,
+       CC_PO   = 4,
+       CC_PE   = 5,
+       CC_P    = 6,
+       CC_M    = 7
+};
+
+struct regs8 {
+       uint8_t a, f, b, c, d, e, h, l;
+};
+struct regs16 {
+       uint16_t af, bc, de, hl;
+};
+
+union genregs {
+       struct regs8 r;
+       struct regs16 rr;
+};
+
+struct registers {
+       union genregs g, shadow;        /* general purpose and shadow registers */
+       uint8_t i, r;
+       uint16_t ix, iy, sp, pc;
+       uint8_t iff, imode;
+};
+
+static void runop_main(uint8_t op);
+static void runop_ed(uint8_t op);
+static void runop_cb(uint8_t op);
+static void runop_dd(uint8_t op);
+static void runop_fd(uint8_t op);
+static void runop_ddcb(uint8_t op);
+static void runop_fdcb(uint8_t op);
+
+static void op_load_reg8_reg8(int rdest, int rsrc);
+static void op_load_reg8_imm8(int rdest, uint8_t imm);
+static void op_load_reg8_mem(int rdest, uint16_t addr);
+static void op_store_mem_reg8(uint16_t addr, int rsrc);
+static void op_store_mem_imm8(uint16_t addr, uint8_t imm);
+static void op_store_mem_reg16(uint16_t addr, int rsrc);
+static void op_load_reg16_imm16(int rdest, uint16_t imm);
+static void op_load_reg16_reg16(int rdest, int rsrc);
+static void op_exch_mem_reg16(uint16_t addr, int rr);
+static void op_alu_reg8(int op, int r);
+static void op_alu_imm8(int op, uint8_t imm);
+static void op_incdec_reg8(int r, int adj);
+static void op_incdec_reg16(int r, int adj);
+static void op_incdec_mem(uint16_t addr, int adj);
+static void op_add_reg16_reg16(int rdest, int rsrc);
+static void op_rl_reg8(int r, int width);
+static void op_rr_reg8(int r, int width);
+static void op_push_reg16(int r);
+static void op_pop_reg16(int r);
+static void op_call(uint16_t addr);
+static void op_ret(void);
+static void op_input(int r, uint16_t addr);
+static void op_output(uint16_t addr, int r);
+
+static struct registers regs;
+static int halt;
+
+static void (*runop[16])(uint8_t op) = {
+       runop_main,             /* 0000: no prefix */
+       runop_ed,               /* 0001: ED prefix */
+       runop_cb,               /* 0010: CB prefix */
+       0,                              /* 0011: CBED invalid */
+       runop_dd,               /* 0100: DD prefix */
+       0,                              /* 0101: DDED invalid */
+       runop_ddcb,             /* 0110: DDCB prefix */
+       0,                              /* 0111: DDCBED invalid */
+       runop_fd,               /* 1000: FD prefix */
+       0,                              /* 1001: FDED invalid */
+       runop_fdcb,             /* 1010: FDCB prefix */
+       0, 0, 0, 0, 0   /* all the rest combinations are invalid */
+};
+
+static uint8_t *regptr8[8] = {
+       &regs.g.r.b, &regs.g.r.c,
+       &regs.g.r.d, &regs.g.r.e,
+       &regs.g.r.h, &regs.g.r.l,
+       0, &regs.g.r.a
+};
+
+static uint16_t *regptr16[] = {
+       &regs.g.rr.bc,
+       &regs.g.rr.de,
+       &regs.g.rr.hl,
+       &regs.sp,
+
+       &regs.g.rr.bc,
+       &regs.g.rr.de,
+       &regs.g.rr.hl,
+       &regs.g.rr.af
+};
+
+void cpu_reset(void)
+{
+       regs.iff = 0;
+       regs.pc = 0;
+       regs.i = regs.r = 0;
+       regs.imode = 0;
+}
+
+static uint8_t fetch_byte(void)
+{
+       return emu_mem_read(regs.pc++);
+}
+
+static uint16_t fetch_imm16(void)
+{
+       uint16_t lsb = emu_mem_read(regs.pc++);
+       uint16_t msb = emu_mem_read(regs.pc++);
+       return lsb | (msb << 8);
+}
+
+static unsigned int prefix_bit(uint8_t op)
+{
+       switch(op) {
+       case 0xed: return PREFIX_ED;
+       case 0xcb: return PREFIX_CB;
+       case 0xdd: return PREFIX_DD;
+       case 0xfd: return PREFIX_FD;
+       default:
+               break;
+       }
+       return 0;
+}
+
+void cpu_step(void)
+{
+       unsigned int pbit, prefix = 0;
+       uint8_t op;
+
+       if(halt) return;
+
+       op = fetch_byte();
+       if((pbit = prefix_bit(op))) {
+               prefix = pbit;
+               op = fetch_byte();
+
+               /* only treat the next byte as another prefix if the previous was dd or fd */
+               if((pbit = prefix_bit(op)) && (prefix == 0xdd || prefix == 0xfd)) {
+                       prefix |= pbit;
+                       op = fetch_byte();
+               }
+       }
+
+       if(runop[prefix]) {
+               runop[prefix](op);
+       }
+}
+
+static int cond(int cc)
+{
+       switch(cc) {
+       case CC_NZ: return ~regs.g.r.f & FLAGS_Z;
+       case CC_Z:  return regs.g.r.f & FLAGS_Z;
+       case CC_NC: return ~regs.g.r.f & FLAGS_C;
+       case CC_C:  return regs.g.r.f & FLAGS_C;
+       case CC_PO: return ~regs.g.r.f & FLAGS_PV;
+       case CC_PE: return regs.g.r.f & FLAGS_PV;
+       case CC_P:  return ~regs.g.r.f & FLAGS_S;
+       case CC_M:  return regs.g.r.f & FLAGS_S;
+       default:
+               break;
+       }
+       return 0;
+}
+
+#define ALUOP(x)               (((x) >> 3) & 7)
+#define DEST_R(x)              (((x) >> 3) & 7)
+#define OPCOND(x)              (((x) >> 3) & 7)
+#define SRC_R(x)               ((x) & 7)
+#define OP_RR(x)               (((x) >> 4) & 3)
+#define RST_ADDR(x)            ((x) & 0x38)
+
+#define SWAP_RR(a, b) \
+       do { \
+               uint16_t tmp = a; \
+               a = b; \
+               b = tmp; \
+       } while(0)
+
+static void runop_main(uint8_t op)
+{
+       int b67 = op >> 6;
+       uint8_t disp;
+       uint16_t addr;
+
+       switch(op) {
+               /* 8-bit load group except ld r,r/ld r,imm/ld r,(hl)/ld (hl),r in default */
+       case 0x36:
+               op_store_mem_imm8(regs.g.rr.hl, fetch_byte());
+               break;
+       case 0x0a:
+               op_load_reg8_mem(R_A, regs.g.rr.bc);
+               break;
+       case 0x1a:
+               op_load_reg8_mem(R_A, regs.g.rr.de);
+               break;
+       case 0x3a:
+               op_load_reg8_mem(R_A, fetch_imm16());
+               break;
+       case 0x02:
+               op_store_mem_reg8(regs.g.rr.bc, R_A);
+               break;
+       case 0x12:
+               op_store_mem_reg8(regs.g.rr.de, R_A);
+               break;
+       case 0x32:
+               op_store_mem_reg8(fetch_imm16(), R_A);
+               break;
+
+               /* 16-bit load group */
+       case 0x01:
+       case 0x11:
+       case 0x21:
+       case 0x31:
+               op_load_reg16_imm16(OP_RR(op), fetch_imm16());
+               break;
+       case 0x2a:
+               op_load_reg16_imm16(RR_HL, fetch_imm16());
+               break;
+       case 0x22:
+               op_store_mem_reg16(fetch_imm16(), RR_HL);
+               break;
+       case 0xf9:
+               op_load_reg16_reg16(RR_SP, RR_HL);
+               break;
+       case 0xc5:
+       case 0xd5:
+       case 0xe0:
+       case 0xf5:
+               op_push_reg16(RRSET2 | OP_RR(op));
+               break;
+       case 0xc1:
+       case 0xd1:
+       case 0xe1:
+       case 0xf1:
+               op_pop_reg16(RRSET2 | OP_RR(op));
+               break;
+
+               /* exchange, block transfer, block search groups */
+       case 0xeb:
+               SWAP_RR(regs.g.rr.de, regs.g.rr.hl);
+               break;
+       case 0x08:
+               SWAP_RR(regs.g.rr.af, regs.shadow.rr.af);
+               break;
+       case 0xd9:
+               SWAP_RR(regs.g.rr.bc, regs.shadow.rr.bc);
+               SWAP_RR(regs.g.rr.de, regs.shadow.rr.de);
+               SWAP_RR(regs.g.rr.hl, regs.shadow.rr.hl);
+               break;
+       case 0xe3:
+               op_exch_mem_reg16(regs.sp, RR_HL);
+               break;
+
+               /* general purpose arithmetic and cpu control groups */
+       case 0x27:
+               break;  /* TODO implement DAA */
+       case 0x2f:      /* cpl a */
+               regs.g.r.a = ~regs.g.r.a;
+               regs.g.r.f |= FLAGS_H | FLAGS_N;
+               break;
+       case 0x3f:      /* ccf */
+               regs.g.r.f ^= FLAGS_C;
+               break;
+       case 0x37:      /* scf */
+               regs.g.r.f |= FLAGS_C;
+       case 0x00:      /* nop */
+               break;
+       case 0x76:      /* halt */
+               halt = 1;
+               break;
+       case 0xf3:      /* di */
+               regs.iff = 0;
+               break;
+       case 0xfb:      /* ei */
+               regs.iff = 1;
+               break;
+
+               /* 16-bit arithmetic group */
+       case 0x09:
+       case 0x19:
+       case 0x29:
+       case 0x39:
+               op_add_reg16_reg16(RR_HL, OP_RR(op));
+               break;
+       case 0x03:
+       case 0x13:
+       case 0x23:
+       case 0x33:
+               op_incdec_reg16(OP_RR(op), 1);
+               break;
+       case 0x0b:
+       case 0x1b:
+       case 0x2b:
+       case 0x3b:
+               op_incdec_reg16(OP_RR(op), -1);
+               break;
+
+               /* rotate and shift group */
+       case 0x07:      /* rlca */
+               op_rl_reg8(R_A, 8);
+               break;
+       case 0x17:      /* rla */
+               op_rl_reg8(R_A, 9);
+               break;
+       case 0x0f:      /* rrca */
+               op_rr_reg8(R_A, 8);
+               break;
+       case 0x1f:      /* rra */
+               op_rr_reg8(R_A, 9);
+               break;
+
+               /* jump group except jp cc, imm16 in default */
+       case 0xc3:      /* jp imm16 */
+               regs.pc = fetch_imm16();
+               break;
+       case 0x18:      /* jr imm8 */
+               regs.pc += fetch_byte();
+               break;
+       case 0x38:      /* jr c, imm8 */
+               disp = fetch_byte();
+               if(cond(CC_C)) regs.pc += disp;
+               break;
+       case 0x30:      /* jr nc, imm8 */
+               disp = fetch_byte();
+               if(cond(CC_NC)) regs.pc += disp;
+               break;
+       case 0x28:      /* jr z, imm8 */
+               disp = fetch_byte();
+               if(cond(CC_Z)) regs.pc += disp;
+               break;
+       case 0x20:      /* jr nz, imm8 */
+               disp = fetch_byte();
+               if(cond(CC_NZ)) regs.pc += disp;
+               break;
+       case 0xe9:      /* jp (hl) */
+               regs.pc = regs.g.rr.hl;
+               break;
+       case 0x10:      /* djnz, imm8 */
+               disp = fetch_byte();
+               if(--regs.g.r.b) regs.pc += disp;
+               break;
+
+               /* call and return group except call cc,imm16/ret cc,imm16/rst */
+       case 0xcd:
+               op_call(fetch_imm16());
+               break;
+       case 0xc9:
+               op_ret();
+               break;
+
+               /* input and output group */
+       case 0xdb:
+               op_input(R_A, ((uint16_t)regs.g.r.a << 8) | fetch_byte());
+               break;
+       case 0xd3:
+               op_output(((uint16_t)regs.g.r.a << 8) | fetch_byte(), R_A);
+               break;
+
+       default:
+               switch(b67) {
+               case 0:
+                       if(SRC_R(op) == 6) {
+                               op_load_reg8_imm8(DEST_R(op), fetch_byte());
+                       } else if(SRC_R(op) == 4 || SRC_R(op) == 5) {
+                               int adj = (op & 1) ? -1 : 1;
+                               if(DEST_R(op) != 6) {
+                                       op_incdec_reg8(DEST_R(op), adj);
+                               } else {
+                                       op_incdec_mem(regs.g.rr.hl, adj);
+                               }
+                       }
+                       break;
+
+               case 1:
+                       if(DEST_R(op) != 6 && SRC_R(op) != 6) {
+                               op_load_reg8_reg8(DEST_R(op), SRC_R(op));
+                       } else {
+                               if(SRC_R(op) == 6) {
+                                       op_load_reg8_mem(DEST_R(op), regs.g.rr.hl);
+                               } else if(DEST_R(op) == 6) {
+                                       op_store_mem_reg8(regs.g.rr.hl, SRC_R(op));
+                               }
+                       }
+                       break;
+
+               case 2:
+                       if(SRC_R(op) != 6) {
+                               op_alu_reg8(ALUOP(op), SRC_R(op));
+                       }
+                       break;
+
+               case 3:
+                       if(SRC_R(op) == 6) {    /* alu-op a, imm8 */
+                               op_alu_imm8(ALUOP(op), fetch_byte());
+
+                       } else if(SRC_R(op) == 2) { /* jp cc, imm16 */
+                               addr = fetch_imm16();
+                               if(cond(OPCOND(op))) {
+                                       regs.pc = addr;
+                               }
+
+                       } else if(SRC_R(op) == 4) { /* call cc, imm16 */
+                               addr = fetch_imm16();
+                               if(cond(OPCOND(op))) op_call(addr);
+
+                       } else if(SRC_R(op) == 0) { /* ret cc, imm16 */
+                               addr = fetch_imm16();
+                               if(cond(OPCOND(op))) op_ret();
+
+                       } else if(SRC_R(op) == 7) { /* rst */
+                               op_call(RST_ADDR(op));
+                       }
+                       break;
+
+               default:
+                       break;
+               }
+
+               break;  /* treat any unknown opcodes as nops */
+       }
+}
+
+static void runop_ed(uint8_t op)
+{
+}
+
+static void runop_cb(uint8_t op)
+{
+}
+
+static void runop_dd(uint8_t op)
+{
+}
+
+static void runop_fd(uint8_t op)
+{
+}
+
+static void runop_ddcb(uint8_t op)
+{
+}
+
+static void runop_fdcb(uint8_t op)
+{
+}
+
+static void set_reg8(int r, uint8_t val)
+{
+       *regptr8[r] = val;
+}
+
+static void set_reg8s(int r, int8_t val)
+{
+       *regptr8[r] = *(uint8_t*)&val;
+}
+
+static uint8_t get_reg8(int r)
+{
+       return *regptr8[r];
+}
+
+static int8_t get_reg8s(int r)
+{
+       return *(int8_t*)regptr8[r];
+}
+
+static void set_reg16(int r, uint16_t val)
+{
+       *regptr16[r] = val;
+}
+
+static void set_reg16s(int r, int16_t val)
+{
+       *regptr16[r] = *(uint16_t*)&val;
+}
+
+static uint16_t get_reg16(int r)
+{
+       return *regptr16[r];
+}
+
+static int16_t get_reg16s(int r)
+{
+       return *(int16_t*)regptr16[r];
+}
+
+static void set_flag(unsigned int flag, int val)
+{
+       if(val) {
+               regs.g.r.f |= flag;
+       } else {
+               regs.g.r.f &= ~flag;
+       }
+}
+
+static int parity(int x)
+{
+       int i, s = 0;
+       for(i=0; i<8; i++) {
+               s += x & 1;
+               x >>= 1;
+       }
+       return s & 1;
+}
+
+static int overflow(int x)
+{
+       return x > 127 || x < -128;
+}
+
+static int overflow16(int x)
+{
+       return x > 32767 || x < -32768;
+}
+
+static void op_load_reg8_reg8(int rdest, int rsrc)
+{
+       set_reg8(rdest, get_reg8(rsrc));
+}
+
+static void op_load_reg8_imm8(int rdest, uint8_t imm)
+{
+       set_reg8(rdest, imm);
+}
+
+static void op_load_reg8_mem(int rdest, uint16_t addr)
+{
+       set_reg8(rdest, emu_mem_read(addr));
+}
+
+static void op_store_mem_reg8(uint16_t addr, int rsrc)
+{
+       emu_mem_write(addr, get_reg8(rsrc));
+}
+
+static void op_store_mem_imm8(uint16_t addr, uint8_t imm)
+{
+       emu_mem_write(addr, imm);
+}
+
+static void op_store_mem_reg16(uint16_t addr, int rsrc)
+{
+       uint16_t val = get_reg16(rsrc);
+       emu_mem_write(addr, val);
+       emu_mem_write(addr + 1, val >> 8);
+}
+
+static void op_load_reg16_imm16(int rdest, uint16_t imm)
+{
+       set_reg16(rdest, imm);
+}
+
+static void op_load_reg16_reg16(int rdest, int rsrc)
+{
+       set_reg16(rdest, get_reg16(rsrc));
+}
+
+static void op_exch_mem_reg16(uint16_t addr, int rr)
+{
+       uint16_t val = get_reg16(rr);
+       uint16_t lsb = emu_mem_read(addr);
+       uint16_t msb = emu_mem_read(addr + 1);
+       set_reg16(rr, lsb | (msb << 8));
+       emu_mem_write(addr, val);
+       emu_mem_write(addr + 1, val >> 8);
+}
+
+#define CARRY (regs.g.r.f & 1)
+
+static void op_alu_reg8(int op, int r)
+{
+       op_alu_imm8(op, get_reg8(r));
+}
+
+static void op_alu_imm8(int op, uint8_t imm)
+{
+       int c, h, pv, n = 0;
+       int acc = get_reg8s(R_A);
+       int rval = *(int8_t*)&imm;
+       c = CARRY;
+
+       switch(op) {
+       case ALUOP_ADD:
+               if(0) {
+       case ALUOP_SUB:
+       case ALUOP_CP:
+                       rval = -rval;
+                       c = -c;
+                       n = 1;
+               }
+               h = ((acc & 0xf) + (rval + 0xf)) & 0x10;
+               acc += rval;
+               c = acc & 0x100;
+               pv = overflow(acc);
+               break;
+
+       case ALUOP_ADC:
+               if(0) {
+       case ALUOP_SBC:
+                       rval = -rval;
+                       c = -c;
+                       n = 1;
+               }
+               h = ((acc & 0xf) + (rval + 0xf) + CARRY) & 0x10;
+               acc += rval + CARRY;
+               c = acc & 0x100;
+               pv = overflow(acc);
+               break;
+
+       case ALUOP_AND:
+               acc &= rval;
+               c = 0;
+               h = 1;
+               pv = parity(acc);
+               break;
+       case ALUOP_XOR:
+               acc ^= rval;
+               c = 0;
+               h = 0;
+               pv = parity(acc);
+               break;
+       case ALUOP_OR:
+               acc |= rval;
+               c = 0;
+               h = 0;
+               pv = parity(acc);
+               break;
+       default:
+               return;
+       }
+
+       set_flag(FLAGS_S, acc & 0x80);
+       set_flag(FLAGS_Z, acc == 0);
+       set_flag(FLAGS_H, h);
+       set_flag(FLAGS_PV, pv);
+       set_flag(FLAGS_N, n);
+       set_flag(FLAGS_C, c);
+
+       if(op != ALUOP_CP) {
+               set_reg8s(R_A, acc);
+       }
+}
+
+static void op_incdec_reg8(int r, int adj)
+{
+       int prev = get_reg8s(r);
+       int val = prev + adj;
+
+       set_flag(FLAGS_S, val & 0x80);
+       set_flag(FLAGS_Z, val == 0);
+       set_flag(FLAGS_H, ((prev & 0xf) + adj) & 0x10);
+       set_flag(FLAGS_PV, overflow(val));
+       set_flag(FLAGS_N, adj < 0);
+
+       set_reg8s(r, val);
+}
+
+static void op_incdec_reg16(int r, int adj)
+{
+       set_reg16s(r, get_reg16s(r) + adj);
+}
+
+static void op_incdec_mem(uint16_t addr, int adj)
+{
+       uint16_t lsb = emu_mem_read(addr);
+       uint16_t msb = emu_mem_read(addr + 1);
+       int prev, val;
+
+       lsb |= msb << 8;
+       prev = *(int16_t*)&lsb;
+       val = prev + adj;
+
+       set_flag(FLAGS_S, val & 0x8000);
+       set_flag(FLAGS_Z, val == 0);
+       set_flag(FLAGS_H, ((prev & 0xfff) + adj) & 0x1000);
+       set_flag(FLAGS_PV, overflow16(val));
+       set_flag(FLAGS_N, adj < 0);
+
+       lsb = *(uint16_t*)&val;
+       emu_mem_write(addr, lsb);
+       emu_mem_write(addr + 1, lsb >> 8);
+}
+
+static void op_add_reg16_reg16(int rdest, int rsrc)
+{
+}
+
+static void op_rl_reg8(int r, int width)
+{
+}
+
+static void op_rr_reg8(int r, int width)
+{
+}
+
+static void op_push_reg16(int r)
+{
+}
+
+static void op_pop_reg16(int r)
+{
+}
+
+static void op_call(uint16_t addr)
+{
+}
+
+static void op_ret(void)
+{
+}
+
+static void op_input(int r, uint16_t addr)
+{
+       set_reg8(r, emu_io_read(addr));
+}
+
+static void op_output(uint16_t addr, int r)
+{
+       emu_io_write(addr, get_reg8(r));
+}
diff --git a/emu/src/cpu.h b/emu/src/cpu.h
new file mode 100644 (file)
index 0000000..f9f5b4d
--- /dev/null
@@ -0,0 +1,7 @@
+#ifndef CPU_H_
+#define CPU_H_
+
+void cpu_reset(void);
+void cpu_step(void);
+
+#endif /* CPU_H_ */
diff --git a/emu/src/duart.c b/emu/src/duart.c
new file mode 100644 (file)
index 0000000..35e2312
--- /dev/null
@@ -0,0 +1,169 @@
+#include "duart.h"
+#include "emu.h"
+
+enum {
+       REG_MRA                 = 0x0,
+       REG_SRA_CSRA    = 0x1,
+       REG_CRA                 = 0x2,
+       REG_RBA_TBA             = 0x3,
+       REG_IPCR_ACR    = 0x4,
+       REG_ISR_IMR             = 0x5,
+       REG_CUR_CTUR    = 0x6,
+       REG_CLR_CTLR    = 0x7,
+       REG_MRB                 = 0x8,
+       REG_SRB_CSRB    = 0x9,
+       REG_CRB                 = 0xa,
+       REG_RBB_TBB             = 0xb,
+       REG_IVR                 = 0xc,
+       REG_IP_OPCR             = 0xd,
+       REG_CSTART_OPSET= 0xe,
+       REG_CSTOP_OPCLR = 0xf
+};
+
+enum {
+       CMD_RX_ONOFF    = 0x03,
+       CMD_TX_ONOFF    = 0x0c,
+       CMD_RST_MPTR    = 0x10,
+       CMD_RST_RX              = 0x20,
+       CMD_RST_TX              = 0x30,
+       CMD_RST_ERR             = 0x40,
+       CMD_RST_BRKINT  = 0x50,
+       CMD_START_BRK   = 0x60,
+       CMD_STOP_BRK    = 0x70
+};
+
+enum {
+       STAT_RXRDY              = 0x01,
+       STAT_FFULL              = 0x02,
+       STAT_TXRDY              = 0x04,
+       STAT_TXEMPTY    = 0x08,
+       STAT_ERR_OVR    = 0x10,
+       STAT_ERR_PAR    = 0x20,
+       STAT_ERR_FRM    = 0x40,
+       STAT_ERR_BRK    = 0x80
+};
+
+struct port {
+       uint8_t mode[2];
+       uint8_t clksel;
+       int modeptr;
+       int tx, rx;
+       uint8_t rxfifo[4];
+       int rxfifo_in, rxfifo_out;
+
+};
+
+static struct port port[2];
+static uint8_t reg_ipcr;
+static uint8_t reg_auxctl;
+static uint8_t reg_istat;
+static uint8_t reg_imask;
+static uint16_t reg_count;
+static uint8_t reg_ivec;
+static uint8_t reg_opcr;
+static uint8_t oport;
+
+void duart_reset(void)
+{
+       int i;
+
+       reg_imask = 0;
+       reg_istat = 0;
+       reg_opcr = 0;
+       reg_ivec = 0xf;
+       oport = 0;
+
+       for(i=0; i<2; i++) {
+               port[i].mode[0] = port[i].mode[1] = 0;
+               port[i].modeptr = 0;
+               port[i].tx = port[i].rx = 0;
+               port[i].rxfifo_in = port[i].rxfifo_out = 0;
+       }
+}
+
+void duart_serin(int port, int c)
+{
+}
+
+static int tx_ready(int pidx)
+{
+       return port[pidx].tx;
+}
+
+static int rx_ready(int pidx)
+{
+       return port[pidx].rxfifo_in != port[pidx].rxfifo_out;
+}
+
+static int rx_full(int pidx)
+{
+       return ((port[pidx].rxfifo_in + 1) & 3) == port[pidx].rxfifo_out;
+}
+
+static void command(int pidx, uint8_t data)
+{
+       if(data & CMD_RX_ONOFF) {
+               port[pidx].rx = (data & CMD_RX_ONOFF) == 1;
+       }
+       if(data & CMD_TX_ONOFF) {
+               port[pidx].tx = (data & CMD_TX_ONOFF) == 4;
+       }
+       switch(data & 0xf0) {
+       case CMD_RST_MPTR:
+               port[pidx].modeptr = 0;
+               break;
+
+       default:
+               break;
+       }
+}
+
+uint8_t duart_read(int rs)
+{
+       uint8_t res;
+       int pidx = (rs >> 3) & 1;
+
+       switch(rs) {
+       case REG_SRA_CSRA:
+       case REG_SRB_CSRB:
+               res = STAT_TXEMPTY | STAT_TXRDY;
+               if(rx_ready(pidx)) {
+                       res |= STAT_RXRDY;
+               }
+               if(rx_full(pidx)) {
+                       res |= STAT_FFULL;
+               }
+               return res;
+
+       default:
+               break;
+       }
+       return 0;
+}
+
+void duart_write(int rs, uint8_t data)
+{
+       int mptr;
+       int pidx = (rs >> 3) & 1;
+
+       switch(rs) {
+       case REG_CRA:
+       case REG_CRB:
+               command(pidx, data);
+               break;
+
+       case REG_MRA:
+       case REG_MRB:
+               mptr = port[pidx].modeptr;
+               port[pidx].mode[mptr] = data;
+               if(!mptr) port[pidx].modeptr = 1;
+               break;
+
+       case REG_RBA_TBA:
+       case REG_RBB_TBB:
+               if(tx_ready(pidx)) {
+                       emu_serout(pidx, data);
+               }
+               break;
+       }
+}
diff --git a/emu/src/duart.h b/emu/src/duart.h
new file mode 100644 (file)
index 0000000..f2e125b
--- /dev/null
@@ -0,0 +1,12 @@
+#ifndef DUART_H_
+#define DUART_H_
+
+#include <stdint.h>
+
+void duart_reset(void);
+void duart_serin(int port, int c);
+
+uint8_t duart_read(int rs);
+void duart_write(int rs, uint8_t data);
+
+#endif /* DUART_H_ */
diff --git a/emu/src/emu.c b/emu/src/emu.c
new file mode 100644 (file)
index 0000000..01f798a
--- /dev/null
@@ -0,0 +1,74 @@
+#include <stdlib.h>
+#include "emu.h"
+#include "cpu.h"
+#include "duart.h"
+
+#define RAM_SIZE       0x8000
+static uint8_t ram[RAM_SIZE];
+static uint8_t *rom;
+static int rom_size;
+
+int emu_init(void *romimg, int romsz)
+{
+       rom = romimg;
+       rom_size = romsz;
+
+       emu_reset();
+       return 0;
+}
+
+void emu_reset(void)
+{
+       cpu_reset();
+       duart_reset();
+}
+
+void emu_cleanup(void)
+{
+}
+
+void emu_step(void)
+{
+       cpu_step();
+}
+
+uint8_t emu_mem_read(uint16_t addr)
+{
+       if(addr & 0x8000) {     /* RAM */
+               return ram[addr & 0x7fff];
+       } else { /* ROM */
+               if((int)addr < rom_size) {
+                       return rom[addr];
+               }
+       }
+       return 0;
+}
+
+void emu_mem_write(uint16_t addr, uint8_t data)
+{
+       if(addr & 0x8000) {
+               ram[addr & 0x7fff] = data;
+       }
+}
+
+uint8_t emu_io_read(uint16_t addr)
+{
+       if((addr & 0xf0) == 0) {
+               return duart_read(addr & 0xf);
+       }
+
+       /* nothing is enabled, the bus floats, return random bits */
+       return rand();
+}
+
+void emu_io_write(uint16_t addr, uint8_t data)
+{
+       if((addr & 0xf0) == 0) {
+               duart_write(addr & 0xf, data);
+       }
+}
+
+void emu_serin(int port, int c)
+{
+       duart_serin(port, c);
+}
diff --git a/emu/src/emu.h b/emu/src/emu.h
new file mode 100644 (file)
index 0000000..dcded5d
--- /dev/null
@@ -0,0 +1,20 @@
+#ifndef EMU_H_
+#define EMU_H_
+
+#include <stdint.h>
+
+int emu_init(void *romimg, int romsz);
+void emu_cleanup(void);
+
+void emu_reset(void);
+void emu_step(void);
+
+uint8_t emu_mem_read(uint16_t addr);
+void emu_mem_write(uint16_t addr, uint8_t data);
+uint8_t emu_io_read(uint16_t addr);
+void emu_io_write(uint16_t addr, uint8_t data);
+
+void emu_serin(int port, int c);
+void emu_serout(int port, int c);      /* implemented by the backend */
+
+#endif /* EMU_H_ */
diff --git a/emu/src/main.c b/emu/src/main.c
new file mode 100644 (file)
index 0000000..54a3d3c
--- /dev/null
@@ -0,0 +1,149 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+#include <signal.h>
+#include <unistd.h>
+#include <sched.h>
+#include <fcntl.h>
+#include <termios.h>
+#include <sys/stat.h>
+#include <sys/select.h>
+#include <sys/mman.h>
+#include "emu.h"
+
+static void sighandler(int s);
+static int parse_args(int argc, char **argv);
+
+static const char *rom_fname = "rom";
+static const char *termdev = "/dev/tty";
+
+static int ttyfd;
+static struct termios saved_term;
+static volatile int quit;
+
+int main(int argc, char **argv)
+{
+       void *rom;
+       int res, fd, maxfd;
+       struct stat st;
+       struct termios term;
+       fd_set rdset;
+       struct timeval tv = {0, 0};
+
+       if(parse_args(argc, argv) == -1) {
+               return 1;
+       }
+
+       if((fd = open(rom_fname, O_RDONLY)) == -1) {
+               fprintf(stderr, "failed to open ROM image: %s: %s\n", rom_fname, strerror(errno));
+               return -1;
+       }
+       fstat(fd, &st);
+
+       if((rom = mmap(0, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0)) == (void*)-1) {
+               fprintf(stderr, "failed to map ROM image\n");
+               return -1;
+       }
+
+       if((ttyfd = open(termdev, O_RDWR)) == -1) {
+               fprintf(stderr, "failed to open terminal device: %s: %s\n", termdev, strerror(errno));
+               return -1;
+       }
+       if(tcgetattr(ttyfd, &term) == -1) {
+               perror("failed to get terminal attributes");
+               return -1;
+       }
+       saved_term = term;
+       term.c_iflag &= ~(IGNBRK | BRKINT | PARMRK | ISTRIP | INLCR | IGNCR | ICRNL | IXON);
+       term.c_oflag &= ~OPOST;
+       term.c_lflag &= ~(ECHO | ECHONL | ICANON | ISIG | IEXTEN);
+       term.c_cflag = (term.c_cflag & ~(CSIZE | PARENB)) | CS8;
+       term.c_cc[VMIN] = 0;
+       term.c_cc[VTIME] = 1;
+       tcsetattr(ttyfd, TCSAFLUSH, &term);
+
+       if(emu_init(rom, st.st_size) == -1) {
+               return 1;
+       }
+
+       signal(SIGINT, sighandler);
+       signal(SIGQUIT, sighandler);
+       signal(SIGTERM, sighandler);
+       signal(SIGSEGV, sighandler);
+       signal(SIGILL, sighandler);
+
+       while(!quit) {
+               FD_ZERO(&rdset);
+               FD_SET(ttyfd, &rdset);
+
+               maxfd = ttyfd;
+
+               res = select(maxfd + 1, &rdset, 0, 0, &tv);
+               if(quit) break;
+
+               if(res > 0) {
+                       if(FD_ISSET(ttyfd, &rdset)) {
+                               int i, rd;
+                               char buf[256];
+
+                               while((rd = read(ttyfd, buf, sizeof buf)) > 0) {
+                                       for(i=0; i<rd; i++) {
+                                               emu_serin(0, buf[i]);
+                                       }
+                               }
+                               if(!rd) break;  /* EOF */
+                       }
+               }
+
+               emu_step();
+               sched_yield();
+       }
+
+       emu_cleanup();
+
+       tcsetattr(ttyfd, TCSAFLUSH, &saved_term);
+       return 0;
+}
+
+void emu_serout(int port, int c)
+{
+       write(ttyfd, &c, 1);
+}
+
+static void sighandler(int s)
+{
+       quit = 1;
+}
+
+static int parse_args(int argc, char **argv)
+{
+       int i;
+
+       for(i=1; i<argc; i++) {
+               if(argv[i][0] == '-') {
+                       if(argv[i][2] == 0) {
+                               switch(argv[i][1]) {
+                               case 'r':
+                                       if(!argv[++i]) {
+                                               fprintf(stderr, "-r must be followed by a rom image file\n");
+                                               return -1;
+                                       }
+                                       rom_fname = argv[i];
+                                       break;
+
+                               default:
+                                       fprintf(stderr, "invalid option: %s\n", argv[i]);
+                                       return -1;
+                               }
+                       } else {
+                               fprintf(stderr, "invalid option: %s\n", argv[i]);
+                               return -1;
+                       }
+               } else {
+                       fprintf(stderr, "unexpected argument: %s\n", argv[i]);
+                       return -1;
+               }
+       }
+       return 0;
+}
diff --git a/glue.jed b/glue.jed
deleted file mode 100644 (file)
index 5411174..0000000
--- a/glue.jed
+++ /dev/null
@@ -1,21 +0,0 @@
-\ 2Compiled from glue.pld by GALasm, then modified by hand
-to make it work with minipro.
-Device: GAL16V8*
-F0*
-G0*
-QF2194*
-L0000 11111111111110111111111110111101*
-L0256 11111111111101111111111110111101*
-L0512 10101011101111111111011111101011*
-L0544 10101011101111111111011011111011*
-L0768 10101011101111111111011111101011*
-L0800 10101011101111111111011011111011*
-L1024 11111111111111111111101111111011*
-L2048 00010000*
-L2056 0110011101101100011101010110010101111010001110000011000000000000*
-L2120 00000011*
-L2128 1111111111111111111111111111111111111111111111111111111111111111*
-L2192 1*
-L2193 0*
-C2427*
-\ 38009
diff --git a/glue.pld b/glue.pld
deleted file mode 100644 (file)
index 059e8e1..0000000
--- a/glue.pld
+++ /dev/null
@@ -1,19 +0,0 @@
-GAL16V8
-gluez80
-
-A4 A5 A6 A7 A15 NC M1 MREQ IOREQ GND
-RFSH RD WR NC /IACK UARTENP /UARTEN /RAMEN /ROMEN VCC
-
-ROMEN = /MREQ * RFSH * /A15
-RAMEN = /MREQ * RFSH * A15
-UARTEN = /IOREQ*M1*/A7*/A6*/A5*/A4*/RD + /IOREQ*M1*/A7*/A6*/A5*/A4*/WR
-UARTENP = /IOREQ*M1*/A7*/A6*/A5*/A4*/RD + /IOREQ*M1*/A7*/A6*/A5*/A4*/WR
-IACK = /IOREQ * /M1
-
-DESCRIPTION
-Z80 computer 2 glue logic and address decoding
-/ROMEN enables the ROM for memory cycles from 0000h to 0fffh
-/RAMEN enables the RAM for memory cycles from 1000h to ffffh
-/UARTEN enables the DUART for I/O cycles from port 0 to 15
-UARTENP is the negation of /UARTEN, needed for the DUART wait state logic
-/IACK signifies an interrupt acknowledge cycle
diff --git a/hw/Makefile b/hw/Makefile
new file mode 100644 (file)
index 0000000..3b18b75
--- /dev/null
@@ -0,0 +1,8 @@
+glue.jed: glue.pld
+
+%.jed: %.pld
+       galasm $<
+
+.PHONY: program
+program: glue.jed
+       minipro -p ATF16V8B -c config -w $<
diff --git a/hw/glue.jed b/hw/glue.jed
new file mode 100644 (file)
index 0000000..5411174
--- /dev/null
@@ -0,0 +1,21 @@
+\ 2Compiled from glue.pld by GALasm, then modified by hand
+to make it work with minipro.
+Device: GAL16V8*
+F0*
+G0*
+QF2194*
+L0000 11111111111110111111111110111101*
+L0256 11111111111101111111111110111101*
+L0512 10101011101111111111011111101011*
+L0544 10101011101111111111011011111011*
+L0768 10101011101111111111011111101011*
+L0800 10101011101111111111011011111011*
+L1024 11111111111111111111101111111011*
+L2048 00010000*
+L2056 0110011101101100011101010110010101111010001110000011000000000000*
+L2120 00000011*
+L2128 1111111111111111111111111111111111111111111111111111111111111111*
+L2192 1*
+L2193 0*
+C2427*
+\ 38009
diff --git a/hw/glue.pld b/hw/glue.pld
new file mode 100644 (file)
index 0000000..059e8e1
--- /dev/null
@@ -0,0 +1,19 @@
+GAL16V8
+gluez80
+
+A4 A5 A6 A7 A15 NC M1 MREQ IOREQ GND
+RFSH RD WR NC /IACK UARTENP /UARTEN /RAMEN /ROMEN VCC
+
+ROMEN = /MREQ * RFSH * /A15
+RAMEN = /MREQ * RFSH * A15
+UARTEN = /IOREQ*M1*/A7*/A6*/A5*/A4*/RD + /IOREQ*M1*/A7*/A6*/A5*/A4*/WR
+UARTENP = /IOREQ*M1*/A7*/A6*/A5*/A4*/RD + /IOREQ*M1*/A7*/A6*/A5*/A4*/WR
+IACK = /IOREQ * /M1
+
+DESCRIPTION
+Z80 computer 2 glue logic and address decoding
+/ROMEN enables the ROM for memory cycles from 0000h to 0fffh
+/RAMEN enables the RAM for memory cycles from 1000h to ffffh
+/UARTEN enables the DUART for I/O cycles from port 0 to 15
+UARTENP is the negation of /UARTEN, needed for the DUART wait state logic
+/IACK signifies an interrupt acknowledge cycle
diff --git a/hw/sym-lib-table b/hw/sym-lib-table
new file mode 100644 (file)
index 0000000..17d264b
--- /dev/null
@@ -0,0 +1,3 @@
+(sym_lib_table
+  (lib (name z80comp2)(type Legacy)(uri ${KIPRJMOD}/z80comp2.lib)(options "")(descr ""))
+)
diff --git a/hw/z80comp2-cache.lib b/hw/z80comp2-cache.lib
new file mode 100644 (file)
index 0000000..1b03780
--- /dev/null
@@ -0,0 +1,594 @@
+EESchema-LIBRARY Version 2.4
+#encoding utf-8
+#
+# 74xx_74HC14
+#
+DEF 74xx_74HC14 U 0 40 Y Y 7 L N
+F0 "U" 0 50 50 H V C CNN
+F1 "74xx_74HC14" 0 -50 50 H V C CNN
+F2 "" 0 0 50 H I C CNN
+F3 "" 0 0 50 H I C CNN
+ALIAS 74LS14
+$FPLIST
+ DIP*W7.62mm*
+$ENDFPLIST
+DRAW
+S -200 300 200 -300 7 1 10 f
+P 4 1 0 10 -150 150 -150 -150 150 0 -150 150 f
+P 4 2 0 10 -150 150 -150 -150 150 0 -150 150 f
+P 4 3 0 10 -150 150 -150 -150 150 0 -150 150 f
+P 4 4 0 10 -150 150 -150 -150 150 0 -150 150 f
+P 4 5 0 10 -150 150 -150 -150 150 0 -150 150 f
+P 4 6 0 10 -150 150 -150 -150 150 0 -150 150 f
+P 3 1 1 0 -75 -50 -75 50 -25 50 N
+P 4 1 1 0 -100 -50 -25 -50 -25 50 0 50 N
+P 3 2 1 0 -75 -50 -75 50 -25 50 N
+P 4 2 1 0 -100 -50 -25 -50 -25 50 0 50 N
+P 3 3 1 0 -75 -50 -75 50 -25 50 N
+P 4 3 1 0 -100 -50 -25 -50 -25 50 0 50 N
+P 3 4 1 0 -75 -50 -75 50 -25 50 N
+P 4 4 1 0 -100 -50 -25 -50 -25 50 0 50 N
+P 3 5 1 0 -75 -50 -75 50 -25 50 N
+P 4 5 1 0 -100 -50 -25 -50 -25 50 0 50 N
+P 3 6 1 0 -75 -50 -75 50 -25 50 N
+P 4 6 1 0 -100 -50 -25 -50 -25 50 0 50 N
+X ~ 1 -300 0 150 R 50 50 1 0 I
+X ~ 2 300 0 150 L 50 50 1 0 O I
+X ~ 3 -300 0 150 R 50 50 2 0 I
+X ~ 4 300 0 150 L 50 50 2 0 O I
+X ~ 5 -300 0 150 R 50 50 3 0 I
+X ~ 6 300 0 150 L 50 50 3 0 O I
+X ~ 8 300 0 150 L 50 50 4 0 O I
+X ~ 9 -300 0 150 R 50 50 4 0 I
+X ~ 10 300 0 150 L 50 50 5 0 O I
+X ~ 11 -300 0 150 R 50 50 5 0 I
+X ~ 12 300 0 150 L 50 50 6 0 O I
+X ~ 13 -300 0 150 R 50 50 6 0 I
+X VCC 14 0 500 200 D 50 50 7 0 W
+X GND 7 0 -500 200 U 50 50 7 0 W
+ENDDRAW
+ENDDEF
+#
+# 74xx_74LS05
+#
+DEF 74xx_74LS05 U 0 40 Y Y 7 L N
+F0 "U" 0 50 50 H V C CNN
+F1 "74xx_74LS05" 0 -50 50 H V C CNN
+F2 "" 0 0 50 H I C CNN
+F3 "" 0 0 50 H I C CNN
+ALIAS 74LS06 74LS06N
+$FPLIST
+ DIP*W7.62mm*
+$ENDFPLIST
+DRAW
+S -200 300 200 -300 7 1 10 f
+P 4 1 0 10 -150 150 -150 -150 150 0 -150 150 f
+P 4 2 0 10 -150 150 -150 -150 150 0 -150 150 f
+P 4 3 0 10 -150 150 -150 -150 150 0 -150 150 f
+P 4 4 0 10 -150 150 -150 -150 150 0 -150 150 f
+P 4 5 0 10 -150 150 -150 -150 150 0 -150 150 f
+P 4 6 0 10 -150 150 -150 -150 150 0 -150 150 f
+X ~ 1 -300 0 150 R 50 50 1 0 I
+X ~ 2 300 0 150 L 50 50 1 0 C I
+X ~ 3 -300 0 150 R 50 50 2 0 I
+X ~ 4 300 0 150 L 50 50 2 0 C I
+X ~ 5 -300 0 150 R 50 50 3 0 I
+X ~ 6 300 0 150 L 50 50 3 0 C I
+X ~ 8 300 0 150 L 50 50 4 0 C I
+X ~ 9 -300 0 150 R 50 50 4 0 I
+X ~ 10 300 0 150 L 50 50 5 0 C I
+X ~ 11 -300 0 150 R 50 50 5 0 I
+X ~ 12 300 0 150 L 50 50 6 0 C I
+X ~ 13 -300 0 150 R 50 50 6 0 I
+X VCC 14 0 500 200 D 50 50 7 0 W
+X GND 7 0 -500 200 U 50 50 7 0 W
+ENDDRAW
+ENDDEF
+#
+# CPU_Z80CPU
+#
+DEF CPU_Z80CPU U 0 40 Y Y 1 F N
+F0 "U" -550 1400 50 H V L CNN
+F1 "CPU_Z80CPU" 250 1400 50 H V L CNN
+F2 "" 0 400 50 H I C CNN
+F3 "" 0 400 50 H I C CNN
+$FPLIST
+ DIP*
+ PDIP*
+$ENDFPLIST
+DRAW
+S -550 1350 550 -1350 0 1 10 f
+X A11 1 700 100 150 L 50 50 1 1 O
+X D6 10 700 -1100 150 L 50 50 1 1 B
+X VCC 11 0 1500 150 D 50 50 1 1 W
+X D2 12 700 -700 150 L 50 50 1 1 B
+X D7 13 700 -1200 150 L 50 50 1 1 B
+X D0 14 700 -500 150 L 50 50 1 1 B
+X D1 15 700 -600 150 L 50 50 1 1 B
+X ~INT~ 16 -700 500 150 R 50 50 1 1 I
+X ~NMI~ 17 -700 600 150 R 50 50 1 1 I
+X ~HALT~ 18 -700 -100 150 R 50 50 1 1 O
+X ~MREQ~ 19 -700 -700 150 R 50 50 1 1 O
+X A12 2 700 0 150 L 50 50 1 1 O
+X ~IORQ~ 20 -700 -800 150 R 50 50 1 1 O
+X ~RD~ 21 -700 -500 150 R 50 50 1 1 O
+X ~WR~ 22 -700 -600 150 R 50 50 1 1 O
+X ~BUSACK~ 23 -700 -1200 150 R 50 50 1 1 O
+X ~WAIT~ 24 -700 0 150 R 50 50 1 1 I
+X ~BUSRQ~ 25 -700 -1100 150 R 50 50 1 1 I
+X ~RESET~ 26 -700 1200 150 R 50 50 1 1 I
+X ~M1~ 27 -700 200 150 R 50 50 1 1 O
+X ~RFSH~ 28 -700 100 150 R 50 50 1 1 O
+X GND 29 0 -1500 150 U 50 50 1 1 W
+X A13 3 700 -100 150 L 50 50 1 1 O
+X A0 30 700 1200 150 L 50 50 1 1 O
+X A1 31 700 1100 150 L 50 50 1 1 O
+X A2 32 700 1000 150 L 50 50 1 1 O
+X A3 33 700 900 150 L 50 50 1 1 O
+X A4 34 700 800 150 L 50 50 1 1 O
+X A5 35 700 700 150 L 50 50 1 1 O
+X A6 36 700 600 150 L 50 50 1 1 O
+X A7 37 700 500 150 L 50 50 1 1 O
+X A8 38 700 400 150 L 50 50 1 1 O
+X A9 39 700 300 150 L 50 50 1 1 O
+X A14 4 700 -200 150 L 50 50 1 1 O
+X A10 40 700 200 150 L 50 50 1 1 O
+X A15 5 700 -300 150 L 50 50 1 1 O
+X ~CLK~ 6 -700 900 150 R 50 50 1 1 I C
+X D4 7 700 -900 150 L 50 50 1 1 B
+X D3 8 700 -800 150 L 50 50 1 1 B
+X D5 9 700 -1000 150 L 50 50 1 1 B
+ENDDRAW
+ENDDEF
+#
+# Connector_Conn_01x03_Male
+#
+DEF Connector_Conn_01x03_Male J 0 40 Y N 1 F N
+F0 "J" 0 200 50 H V C CNN
+F1 "Connector_Conn_01x03_Male" 0 -200 50 H V C CNN
+F2 "" 0 0 50 H I C CNN
+F3 "" 0 0 50 H I C CNN
+$FPLIST
+ Connector*:*_1x??_*
+$ENDFPLIST
+DRAW
+S 34 -95 0 -105 1 1 6 F
+S 34 5 0 -5 1 1 6 F
+S 34 105 0 95 1 1 6 F
+P 2 1 1 6 50 -100 34 -100 N
+P 2 1 1 6 50 0 34 0 N
+P 2 1 1 6 50 100 34 100 N
+X Pin_1 1 200 100 150 L 50 50 1 1 P
+X Pin_2 2 200 0 150 L 50 50 1 1 P
+X Pin_3 3 200 -100 150 L 50 50 1 1 P
+ENDDRAW
+ENDDEF
+#
+# Connector_DB9_Male
+#
+DEF Connector_DB9_Male J 0 40 Y N 1 F N
+F0 "J" 0 550 50 H V C CNN
+F1 "Connector_DB9_Male" 0 -575 50 H V C CNN
+F2 "" 0 0 50 H I C CNN
+F3 "" 0 0 50 H I C CNN
+$FPLIST
+ DSUB*Male*
+$ENDFPLIST
+DRAW
+C -70 -400 30 0 1 0 F
+C -70 -200 30 0 1 0 F
+C -70 0 30 0 1 0 F
+C -70 200 30 0 1 0 F
+C -70 400 30 0 1 0 F
+C 50 -300 30 0 1 0 F
+C 50 -100 30 0 1 0 F
+C 50 100 30 0 1 0 F
+C 50 300 30 0 1 0 F
+P 2 0 1 0 -150 -400 -100 -400 N
+P 2 0 1 0 -150 -300 20 -300 N
+P 2 0 1 0 -150 -200 -100 -200 N
+P 2 0 1 0 -150 -100 20 -100 N
+P 2 0 1 0 -150 0 -100 0 N
+P 2 0 1 0 -150 100 20 100 N
+P 2 0 1 0 -150 200 -100 200 N
+P 2 0 1 0 -150 300 20 300 N
+P 2 0 1 0 -150 400 -100 400 N
+P 5 0 1 10 -150 -525 -150 525 150 375 150 -375 -150 -525 f
+X 1 1 -300 -400 150 R 50 50 1 1 P
+X 2 2 -300 -200 150 R 50 50 1 1 P
+X 3 3 -300 0 150 R 50 50 1 1 P
+X 4 4 -300 200 150 R 50 50 1 1 P
+X 5 5 -300 400 150 R 50 50 1 1 P
+X 6 6 -300 -300 150 R 50 50 1 1 P
+X 7 7 -300 -100 150 R 50 50 1 1 P
+X 8 8 -300 100 150 R 50 50 1 1 P
+X 9 9 -300 300 150 R 50 50 1 1 P
+ENDDRAW
+ENDDEF
+#
+# Device_C
+#
+DEF Device_C C 0 10 N Y 1 F N
+F0 "C" 25 100 50 H V L CNN
+F1 "Device_C" 25 -100 50 H V L CNN
+F2 "" 38 -150 50 H I C CNN
+F3 "" 0 0 50 H I C CNN
+$FPLIST
+ C_*
+$ENDFPLIST
+DRAW
+P 2 0 1 20 -80 -30 80 -30 N
+P 2 0 1 20 -80 30 80 30 N
+X ~ 1 0 150 110 D 50 50 1 1 P
+X ~ 2 0 -150 110 U 50 50 1 1 P
+ENDDRAW
+ENDDEF
+#
+# Device_C_Small
+#
+DEF Device_C_Small C 0 10 N N 1 F N
+F0 "C" 10 70 50 H V L CNN
+F1 "Device_C_Small" 10 -80 50 H V L CNN
+F2 "" 0 0 50 H I C CNN
+F3 "" 0 0 50 H I C CNN
+$FPLIST
+ C_*
+$ENDFPLIST
+DRAW
+P 2 0 1 13 -60 -20 60 -20 N
+P 2 0 1 12 -60 20 60 20 N
+X ~ 1 0 100 80 D 50 50 1 1 P
+X ~ 2 0 -100 80 U 50 50 1 1 P
+ENDDRAW
+ENDDEF
+#
+# Device_Crystal_Small
+#
+DEF Device_Crystal_Small Y 0 40 N N 1 F N
+F0 "Y" 0 100 50 H V C CNN
+F1 "Device_Crystal_Small" 0 -100 50 H V C CNN
+F2 "" 0 0 50 H I C CNN
+F3 "" 0 0 50 H I C CNN
+$FPLIST
+ Crystal*
+$ENDFPLIST
+DRAW
+S -30 -60 30 60 0 1 0 N
+P 2 0 1 15 -50 -30 -50 30 N
+P 2 0 1 15 50 -30 50 30 N
+X 1 1 -100 0 50 R 50 50 1 1 P
+X 2 2 100 0 50 L 50 50 1 1 P
+ENDDRAW
+ENDDEF
+#
+# Device_R
+#
+DEF Device_R R 0 0 N Y 1 F N
+F0 "R" 80 0 50 V V C CNN
+F1 "Device_R" 0 0 50 V V C CNN
+F2 "" -70 0 50 V I C CNN
+F3 "" 0 0 50 H I C CNN
+$FPLIST
+ R_*
+$ENDFPLIST
+DRAW
+S -40 -100 40 100 0 1 10 N
+X ~ 1 0 150 50 D 50 50 1 1 P
+X ~ 2 0 -150 50 U 50 50 1 1 P
+ENDDRAW
+ENDDEF
+#
+# Diode_1N4148
+#
+DEF Diode_1N4148 D 0 40 N N 1 F N
+F0 "D" 0 100 50 H V C CNN
+F1 "Diode_1N4148" 0 -100 50 H V C CNN
+F2 "Diode_THT:D_DO-35_SOD27_P7.62mm_Horizontal" 0 -175 50 H I C CNN
+F3 "" 0 0 50 H I C CNN
+ALIAS 1N4448 1N4149 1N4151 1N914 BA243 BA244 BA282 BA283 BAV17 BAV18 BAV19 BAV20 BAV21 BAW75 BAW76 BAY93
+$FPLIST
+ D*DO?35*
+$ENDFPLIST
+DRAW
+P 2 0 1 8 -50 50 -50 -50 N
+P 2 0 1 0 50 0 -50 0 N
+P 4 0 1 8 50 50 50 -50 -50 0 50 50 N
+X K 1 -150 0 100 R 50 50 1 1 P
+X A 2 150 0 100 L 50 50 1 1 P
+ENDDRAW
+ENDDEF
+#
+# Interface_UART_MAX232
+#
+DEF Interface_UART_MAX232 U 0 40 Y Y 1 F N
+F0 "U" -100 1125 50 H V R CNN
+F1 "Interface_UART_MAX232" -100 1050 50 H V R CNN
+F2 "" 50 -1050 50 H I L CNN
+F3 "" 0 100 50 H I C CNN
+ALIAS MAX232I MAX202 ADM232A MAX3232 ICL3232
+$FPLIST
+ SOIC*P1.27mm*
+ DIP*W7.62mm*
+ TSSOP*4.4x5mm*P0.65mm*
+$ENDFPLIST
+DRAW
+C -100 -700 25 0 1 10 N
+C -100 -500 25 0 1 10 N
+C 25 -300 25 0 1 10 N
+C 25 -100 25 0 1 10 N
+T 0 -450 -900 50 0 0 0 LOGIC Normal 0 C C
+T 0 450 -900 50 0 0 0 RS232 Normal 0 C C
+S -600 -1000 600 1000 0 1 10 f
+P 2 0 1 10 -150 -300 -325 -300 N
+P 2 0 1 10 -150 -100 -325 -100 N
+P 2 0 1 10 -125 -700 -325 -700 N
+P 2 0 1 10 -125 -500 -325 -500 N
+P 2 0 1 10 50 -300 250 -300 N
+P 2 0 1 10 50 -100 250 -100 N
+P 2 0 1 10 75 -700 250 -700 N
+P 2 0 1 10 75 -500 250 -500 N
+P 4 0 1 10 -150 -225 -150 -375 0 -300 -150 -225 N
+P 4 0 1 10 -150 -25 -150 -175 0 -100 -150 -25 N
+P 4 0 1 10 75 -625 75 -775 -75 -700 75 -625 N
+P 4 0 1 10 75 -425 75 -575 -75 -500 75 -425 N
+X C1+ 1 -800 900 200 R 50 50 1 1 P
+X T2IN 10 -800 -300 200 R 50 50 1 1 I
+X T1IN 11 -800 -100 200 R 50 50 1 1 I
+X R1OUT 12 -800 -500 200 R 50 50 1 1 O
+X R1IN 13 800 -500 200 L 50 50 1 1 I
+X T1OUT 14 800 -100 200 L 50 50 1 1 O
+X GND 15 0 -1200 200 U 50 50 1 1 W
+X VCC 16 0 1200 200 D 50 50 1 1 W
+X VS+ 2 800 400 200 L 50 50 1 1 w
+X C1- 3 -800 600 200 R 50 50 1 1 P
+X C2+ 4 800 900 200 L 50 50 1 1 P
+X C2- 5 800 600 200 L 50 50 1 1 P
+X VS- 6 800 100 200 L 50 50 1 1 w
+X T2OUT 7 800 -300 200 L 50 50 1 1 O
+X R2IN 8 800 -700 200 L 50 50 1 1 I
+X R2OUT 9 -800 -700 200 R 50 50 1 1 O
+ENDDRAW
+ENDDEF
+#
+# Memory_EEPROM_28C256
+#
+DEF Memory_EEPROM_28C256 U 0 20 Y Y 1 F N
+F0 "U" -300 1050 50 H V C CNN
+F1 "Memory_EEPROM_28C256" 100 -1050 50 H V L CNN
+F2 "" 0 0 50 H I C CNN
+F3 "" 0 0 50 H I C CNN
+$FPLIST
+ DIP*W15.24mm*
+ SOIC*7.5x17.9mm*P1.27mm*
+$ENDFPLIST
+DRAW
+S -300 1000 300 -1000 1 1 10 f
+X A14 1 -400 -500 100 R 50 50 1 1 I
+X A0 10 -400 900 100 R 50 50 1 1 I
+X D0 11 400 900 100 L 50 50 1 1 T
+X D1 12 400 800 100 L 50 50 1 1 T
+X D2 13 400 700 100 L 50 50 1 1 T
+X GND 14 0 -1100 100 U 50 50 1 1 W
+X D3 15 400 600 100 L 50 50 1 1 T
+X D4 16 400 500 100 L 50 50 1 1 T
+X D5 17 400 400 100 L 50 50 1 1 T
+X D6 18 400 300 100 L 50 50 1 1 T
+X D7 19 400 200 100 L 50 50 1 1 T
+X A12 2 -400 -300 100 R 50 50 1 1 I
+X ~CS 20 -400 -900 100 R 50 50 1 1 I
+X A10 21 -400 -100 100 R 50 50 1 1 I
+X ~OE 22 -400 -800 100 R 50 50 1 1 I
+X A11 23 -400 -200 100 R 50 50 1 1 I
+X A9 24 -400 0 100 R 50 50 1 1 I
+X A8 25 -400 100 100 R 50 50 1 1 I
+X A13 26 -400 -400 100 R 50 50 1 1 I
+X ~WE 27 -400 -700 100 R 50 50 1 1 I
+X VCC 28 0 1100 100 D 50 50 1 1 W
+X A7 3 -400 200 100 R 50 50 1 1 I
+X A6 4 -400 300 100 R 50 50 1 1 I
+X A5 5 -400 400 100 R 50 50 1 1 I
+X A4 6 -400 500 100 R 50 50 1 1 I
+X A3 7 -400 600 100 R 50 50 1 1 I
+X A2 8 -400 700 100 R 50 50 1 1 I
+X A1 9 -400 800 100 R 50 50 1 1 I
+ENDDRAW
+ENDDEF
+#
+# Switch_SW_Push
+#
+DEF Switch_SW_Push SW 0 40 N N 1 F N
+F0 "SW" 50 100 50 H V L CNN
+F1 "Switch_SW_Push" 0 -60 50 H V C CNN
+F2 "" 0 200 50 H I C CNN
+F3 "" 0 200 50 H I C CNN
+DRAW
+C -80 0 20 0 1 0 N
+C 80 0 20 0 1 0 N
+P 2 0 1 0 0 50 0 120 N
+P 2 0 1 0 100 50 -100 50 N
+X 1 1 -200 0 100 R 50 50 0 1 P
+X 2 2 200 0 100 L 50 50 0 1 P
+ENDDRAW
+ENDDEF
+#
+# Timer_LM555
+#
+DEF Timer_LM555 U 0 20 Y Y 1 F N
+F0 "U" -400 350 50 H V L CNN
+F1 "Timer_LM555" 100 350 50 H V L CNN
+F2 "" 0 0 50 H I C CNN
+F3 "" 0 0 50 H I C CNN
+ALIAS ICM7555 LMC555xM LMC555xMM LMC555xN MC1455 TLC555CD TLC555CP TLC555CPS NA555 NE555 SE555 SA555
+$FPLIST
+ SOIC*3.9x4.9mm*P1.27mm*
+ DIP*W7.62mm*
+ TSSOP*3x3mm*P0.65mm*
+$ENDFPLIST
+DRAW
+S -350 -300 350 300 0 1 10 f
+S -350 -300 350 300 0 1 10 f
+X GND 1 0 -400 100 U 50 50 0 0 W
+X VCC 8 0 400 100 D 50 50 0 0 W
+X TR 2 -500 200 150 R 50 50 1 1 I
+X Q 3 500 200 150 L 50 50 1 1 O
+X R 4 -500 -200 150 R 50 50 1 1 I I
+X CV 5 -500 0 150 R 50 50 1 1 I
+X THR 6 500 -200 150 L 50 50 1 1 I
+X DIS 7 500 0 150 L 50 50 1 1 I
+ENDDRAW
+ENDDEF
+#
+# power_GND
+#
+DEF power_GND #PWR 0 0 Y Y 1 F P
+F0 "#PWR" 0 -250 50 H I C CNN
+F1 "power_GND" 0 -150 50 H V C CNN
+F2 "" 0 0 50 H I C CNN
+F3 "" 0 0 50 H I C CNN
+DRAW
+P 6 0 1 0 0 0 0 -50 50 -50 0 -100 -50 -50 0 -50 N
+X GND 1 0 0 0 D 50 50 1 1 W N
+ENDDRAW
+ENDDEF
+#
+# power_VCC
+#
+DEF power_VCC #PWR 0 0 Y Y 1 F P
+F0 "#PWR" 0 -150 50 H I C CNN
+F1 "power_VCC" 0 150 50 H V C CNN
+F2 "" 0 0 50 H I C CNN
+F3 "" 0 0 50 H I C CNN
+DRAW
+C 0 75 25 0 1 0 N
+P 2 0 1 0 0 0 0 50 N
+X VCC 1 0 0 0 U 50 50 1 1 W N
+ENDDRAW
+ENDDEF
+#
+# z80comp2_mc68681
+#
+DEF z80comp2_mc68681 U 0 40 Y Y 1 F N
+F0 "U" 150 1350 50 H V C CNN
+F1 "z80comp2_mc68681" -250 1350 50 H V C CNN
+F2 "" 550 -550 50 H I C CNN
+F3 "" 550 -550 50 H I C CNN
+DRAW
+S -350 1300 350 -1500 0 1 0 f
+X RS1 1 -550 900 200 R 50 50 1 1 I
+X RXDB 10 550 -650 200 L 50 50 1 1 P
+X TXDB 11 550 -750 200 L 50 50 1 1 P
+X OP1 12 550 400 200 L 50 50 1 1 O
+X OP3 13 550 200 200 L 50 50 1 1 O
+X OP5 14 550 0 200 L 50 50 1 1 O
+X OP7 15 550 -200 200 L 50 50 1 1 O
+X D1 16 -550 300 200 R 50 50 1 1 B
+X D3 17 -550 100 200 R 50 50 1 1 B
+X D5 18 -550 -100 200 R 50 50 1 1 B
+X D7 19 -550 -300 200 R 50 50 1 1 B
+X IP3 2 550 900 200 L 50 50 1 1 I
+X GND 20 0 -1700 200 U 50 50 1 1 W
+X ~IRQ 21 550 -1250 200 L 50 50 1 1 C
+X D6 22 -550 -200 200 R 50 50 1 1 B
+X D4 23 -550 0 200 R 50 50 1 1 B
+X D2 24 -550 200 200 R 50 50 1 1 B
+X D0 25 -550 400 200 R 50 50 1 1 B
+X OP6 26 550 -100 200 L 50 50 1 1 O
+X OP4 27 550 100 200 L 50 50 1 1 O
+X OP2 28 550 300 200 L 50 50 1 1 O
+X OP0 29 550 500 200 L 50 50 1 1 O
+X RS2 3 -550 800 200 R 50 50 1 1 I
+X TXDA 30 550 -400 200 L 50 50 1 1 P
+X RXDA 31 550 -500 200 L 50 50 1 1 P
+X X1/CLK 32 -550 -1150 200 R 50 50 1 1 I
+X X2 33 -550 -1350 200 R 50 50 1 1 O
+X ~RST 34 -550 1200 200 R 50 50 1 1 I
+X ~CS 35 -550 -600 200 R 50 50 1 1 I
+X IP2 36 550 1000 200 L 50 50 1 1 I
+X ~IACK 37 -550 -800 200 R 50 50 1 1 I
+X IP5 38 550 700 200 L 50 50 1 1 I
+X IP4 39 550 800 200 L 50 50 1 1 I
+X IP1 4 550 1100 200 L 50 50 1 1 I
+X VCC 40 0 1500 200 D 50 50 1 1 W
+X RS3 5 -550 700 200 R 50 50 1 1 I
+X RD4 6 -550 600 200 R 50 50 1 1 I
+X IP0 7 550 1200 200 L 50 50 1 1 I
+X R/~W 8 -550 -500 200 R 50 50 1 1 I
+X ~DTACK 9 550 -1350 200 L 50 50 1 1 C
+ENDDRAW
+ENDDEF
+#
+# z80comp2_sram_um61512ak
+#
+DEF z80comp2_sram_um61512ak U 0 40 Y Y 1 F N
+F0 "U" 100 -1200 60 H V C CNN
+F1 "z80comp2_sram_um61512ak" 0 -50 60 V V C CNN
+F2 "" -100 -800 60 H V C CNN
+F3 "" -100 -800 60 H V C CNN
+DRAW
+S -350 1050 350 -1100 0 1 0 f
+X A2 10 -550 800 200 R 50 50 1 1 I
+X A1 11 -550 900 200 R 50 50 1 1 I
+X A0 12 -550 1000 200 R 50 50 1 1 I
+X D0 13 550 1000 200 L 50 50 1 1 B
+X D1 14 550 900 200 L 50 50 1 1 B
+X D2 15 550 800 200 L 50 50 1 1 B
+X GND 16 0 -1300 200 U 50 50 1 1 W
+X D3 17 550 700 200 L 50 50 1 1 B
+X D4 18 550 600 200 L 50 50 1 1 B
+X D5 19 550 500 200 L 50 50 1 1 B
+X D6 20 550 400 200 L 50 50 1 1 B
+X D7 21 550 300 200 L 50 50 1 1 B
+X ~CE1 22 -550 -950 200 R 50 50 1 1 I I
+X A10 23 -550 0 200 R 50 50 1 1 I
+X ~OE 24 -550 -750 200 R 50 50 1 1 I I
+X A11 25 -550 -100 200 R 50 50 1 1 I
+X A9 26 -550 100 200 R 50 50 1 1 I
+X A8 27 -550 200 200 R 50 50 1 1 I
+X A13 28 -550 -300 200 R 50 50 1 1 I
+X ~WE 29 -550 -850 200 R 50 50 1 1 I I
+X A14 3 -550 -400 200 R 50 50 1 1 I
+X CE2 30 -550 -1050 200 R 50 50 1 1 I
+X A15 31 -550 -500 200 R 50 50 1 1 I
+X VCC 32 0 1250 200 D 50 50 1 1 W
+X A12 4 -550 -200 200 R 50 50 1 1 I
+X A7 5 -550 300 200 R 50 50 1 1 I
+X A6 6 -550 400 200 R 50 50 1 1 I
+X A5 7 -550 500 200 R 50 50 1 1 I
+X A4 8 -550 600 200 R 50 50 1 1 I
+X A3 9 -550 700 200 R 50 50 1 1 I
+ENDDRAW
+ENDDEF
+#
+# z80comp2_z80glue
+#
+DEF z80comp2_z80glue U 0 40 Y Y 1 F N
+F0 "U" 100 650 50 H V C CNN
+F1 "z80comp2_z80glue" -200 650 50 H V C CNN
+F2 "" -350 -400 50 H I C CNN
+F3 "" -350 -400 50 H I C CNN
+DRAW
+S -350 600 350 -600 0 1 0 f
+X A4 1 -550 550 200 R 50 50 1 1 I
+X GND 10 0 -800 200 U 50 50 1 1 W
+X ~RFSH 11 -550 -350 200 R 50 50 1 1 I
+X ~RD 12 -550 -450 200 R 50 50 1 1 I
+X ~WR 13 -550 -550 200 R 50 50 1 1 I
+X NC 14 200 -250 200 L 50 50 1 1 N N
+X ~IACK 15 550 -150 200 L 50 50 1 1 O
+X UARTEN 16 550 350 200 L 50 50 1 1 O
+X ~UARTEN 17 550 250 200 L 50 50 1 1 O
+X ~RAMEN 18 550 150 200 L 50 50 1 1 O
+X ~ROMEN 19 550 50 200 L 50 50 1 1 O
+X A5 2 -550 450 200 R 50 50 1 1 I
+X A6 3 -550 350 200 R 50 50 1 1 I
+X A7 4 -550 250 200 R 50 50 1 1 I
+X A15 5 -550 150 200 R 50 50 1 1 I
+X NC 6 200 -350 200 L 50 50 1 1 N N
+X ~M1 7 -550 -50 200 R 50 50 1 1 I
+X ~MREQ 8 -550 -150 200 R 50 50 1 1 I
+X ~IOREQ 9 -550 -250 200 R 50 50 1 1 I
+X VCC ~ 0 800 200 D 50 50 1 1 W
+ENDDRAW
+ENDDEF
+#
+#End Library
diff --git a/hw/z80comp2.kicad_pcb b/hw/z80comp2.kicad_pcb
new file mode 100644 (file)
index 0000000..02c8ecb
--- /dev/null
@@ -0,0 +1 @@
+(kicad_pcb (version 4) (host kicad "dummy file") )
diff --git a/hw/z80comp2.lib b/hw/z80comp2.lib
new file mode 100644 (file)
index 0000000..caf0107
--- /dev/null
@@ -0,0 +1,130 @@
+EESchema-LIBRARY Version 2.4
+#encoding utf-8
+#
+# mc68681
+#
+DEF mc68681 U 0 40 Y Y 1 F N
+F0 "U" 150 1350 50 H V C CNN
+F1 "mc68681" -250 1350 50 H V C CNN
+F2 "" 550 -550 50 H I C CNN
+F3 "" 550 -550 50 H I C CNN
+DRAW
+S -350 1300 350 -1500 0 1 0 f
+X RS1 1 -550 900 200 R 50 50 1 1 I
+X RXDB 10 550 -650 200 L 50 50 1 1 P
+X TXDB 11 550 -750 200 L 50 50 1 1 P
+X OP1 12 550 400 200 L 50 50 1 1 O
+X OP3 13 550 200 200 L 50 50 1 1 O
+X OP5 14 550 0 200 L 50 50 1 1 O
+X OP7 15 550 -200 200 L 50 50 1 1 O
+X D1 16 -550 300 200 R 50 50 1 1 B
+X D3 17 -550 100 200 R 50 50 1 1 B
+X D5 18 -550 -100 200 R 50 50 1 1 B
+X D7 19 -550 -300 200 R 50 50 1 1 B
+X IP3 2 550 900 200 L 50 50 1 1 I
+X GND 20 0 -1700 200 U 50 50 1 1 W
+X ~IRQ 21 550 -1250 200 L 50 50 1 1 C
+X D6 22 -550 -200 200 R 50 50 1 1 B
+X D4 23 -550 0 200 R 50 50 1 1 B
+X D2 24 -550 200 200 R 50 50 1 1 B
+X D0 25 -550 400 200 R 50 50 1 1 B
+X OP6 26 550 -100 200 L 50 50 1 1 O
+X OP4 27 550 100 200 L 50 50 1 1 O
+X OP2 28 550 300 200 L 50 50 1 1 O
+X OP0 29 550 500 200 L 50 50 1 1 O
+X RS2 3 -550 800 200 R 50 50 1 1 I
+X TXDA 30 550 -400 200 L 50 50 1 1 P
+X RXDA 31 550 -500 200 L 50 50 1 1 P
+X X1/CLK 32 -550 -1150 200 R 50 50 1 1 I
+X X2 33 -550 -1350 200 R 50 50 1 1 O
+X ~RST 34 -550 1200 200 R 50 50 1 1 I
+X ~CS 35 -550 -600 200 R 50 50 1 1 I
+X IP2 36 550 1000 200 L 50 50 1 1 I
+X ~IACK 37 -550 -800 200 R 50 50 1 1 I
+X IP5 38 550 700 200 L 50 50 1 1 I
+X IP4 39 550 800 200 L 50 50 1 1 I
+X IP1 4 550 1100 200 L 50 50 1 1 I
+X VCC 40 0 1500 200 D 50 50 1 1 W
+X RS3 5 -550 700 200 R 50 50 1 1 I
+X RD4 6 -550 600 200 R 50 50 1 1 I
+X IP0 7 550 1200 200 L 50 50 1 1 I
+X R/~W 8 -550 -500 200 R 50 50 1 1 I
+X ~DTACK 9 550 -1350 200 L 50 50 1 1 C
+ENDDRAW
+ENDDEF
+#
+# sram_um61512ak
+#
+DEF sram_um61512ak U 0 40 Y Y 1 F N
+F0 "U" 100 -1200 60 H V C CNN
+F1 "sram_um61512ak" 0 -50 60 V V C CNN
+F2 "" -100 -800 60 H V C CNN
+F3 "" -100 -800 60 H V C CNN
+DRAW
+S -350 1050 350 -1100 0 1 0 f
+X A2 10 -550 800 200 R 50 50 1 1 I
+X A1 11 -550 900 200 R 50 50 1 1 I
+X A0 12 -550 1000 200 R 50 50 1 1 I
+X D0 13 550 1000 200 L 50 50 1 1 B
+X D1 14 550 900 200 L 50 50 1 1 B
+X D2 15 550 800 200 L 50 50 1 1 B
+X GND 16 0 -1300 200 U 50 50 1 1 W
+X D3 17 550 700 200 L 50 50 1 1 B
+X D4 18 550 600 200 L 50 50 1 1 B
+X D5 19 550 500 200 L 50 50 1 1 B
+X D6 20 550 400 200 L 50 50 1 1 B
+X D7 21 550 300 200 L 50 50 1 1 B
+X ~CE1 22 -550 -950 200 R 50 50 1 1 I I
+X A10 23 -550 0 200 R 50 50 1 1 I
+X ~OE 24 -550 -750 200 R 50 50 1 1 I I
+X A11 25 -550 -100 200 R 50 50 1 1 I
+X A9 26 -550 100 200 R 50 50 1 1 I
+X A8 27 -550 200 200 R 50 50 1 1 I
+X A13 28 -550 -300 200 R 50 50 1 1 I
+X ~WE 29 -550 -850 200 R 50 50 1 1 I I
+X A14 3 -550 -400 200 R 50 50 1 1 I
+X CE2 30 -550 -1050 200 R 50 50 1 1 I
+X A15 31 -550 -500 200 R 50 50 1 1 I
+X VCC 32 0 1250 200 D 50 50 1 1 W
+X A12 4 -550 -200 200 R 50 50 1 1 I
+X A7 5 -550 300 200 R 50 50 1 1 I
+X A6 6 -550 400 200 R 50 50 1 1 I
+X A5 7 -550 500 200 R 50 50 1 1 I
+X A4 8 -550 600 200 R 50 50 1 1 I
+X A3 9 -550 700 200 R 50 50 1 1 I
+ENDDRAW
+ENDDEF
+#
+# z80glue
+#
+DEF z80glue U 0 40 Y Y 1 F N
+F0 "U" 100 650 50 H V C CNN
+F1 "z80glue" -200 650 50 H V C CNN
+F2 "" -350 -400 50 H I C CNN
+F3 "" -350 -400 50 H I C CNN
+DRAW
+S -350 600 350 -600 0 1 0 f
+X A4 1 -550 550 200 R 50 50 1 1 I
+X GND 10 0 -800 200 U 50 50 1 1 W
+X ~RFSH 11 -550 -350 200 R 50 50 1 1 I
+X ~RD 12 -550 -450 200 R 50 50 1 1 I
+X ~WR 13 -550 -550 200 R 50 50 1 1 I
+X NC 14 200 -250 200 L 50 50 1 1 N N
+X ~IACK 15 550 -150 200 L 50 50 1 1 O
+X UARTEN 16 550 350 200 L 50 50 1 1 O
+X ~UARTEN 17 550 250 200 L 50 50 1 1 O
+X ~RAMEN 18 550 150 200 L 50 50 1 1 O
+X ~ROMEN 19 550 50 200 L 50 50 1 1 O
+X A5 2 -550 450 200 R 50 50 1 1 I
+X A6 3 -550 350 200 R 50 50 1 1 I
+X A7 4 -550 250 200 R 50 50 1 1 I
+X A15 5 -550 150 200 R 50 50 1 1 I
+X NC 6 200 -350 200 L 50 50 1 1 N N
+X ~M1 7 -550 -50 200 R 50 50 1 1 I
+X ~MREQ 8 -550 -150 200 R 50 50 1 1 I
+X ~IOREQ 9 -550 -250 200 R 50 50 1 1 I
+X VCC ~ 0 800 200 D 50 50 1 1 W
+ENDDRAW
+ENDDEF
+#
+#End Library
diff --git a/hw/z80comp2.pro b/hw/z80comp2.pro
new file mode 100644 (file)
index 0000000..152769c
--- /dev/null
@@ -0,0 +1,33 @@
+update=22/05/2015 07:44:53
+version=1
+last_client=kicad
+[general]
+version=1
+RootSch=
+BoardNm=
+[pcbnew]
+version=1
+LastNetListRead=
+UseCmpFile=1
+PadDrill=0.600000000000
+PadDrillOvalY=0.600000000000
+PadSizeH=1.500000000000
+PadSizeV=1.500000000000
+PcbTextSizeV=1.500000000000
+PcbTextSizeH=1.500000000000
+PcbTextThickness=0.300000000000
+ModuleTextSizeV=1.000000000000
+ModuleTextSizeH=1.000000000000
+ModuleTextSizeThickness=0.150000000000
+SolderMaskClearance=0.000000000000
+SolderMaskMinWidth=0.000000000000
+DrawSegmentWidth=0.200000000000
+BoardOutlineThickness=0.100000000000
+ModuleOutlineThickness=0.150000000000
+[cvpcb]
+version=1
+NetIExt=net
+[eeschema]
+version=1
+LibDir=
+[eeschema/libraries]
diff --git a/hw/z80comp2.sch b/hw/z80comp2.sch
new file mode 100644 (file)
index 0000000..9c74d01
--- /dev/null
@@ -0,0 +1,1741 @@
+EESchema Schematic File Version 4
+EELAYER 30 0
+EELAYER END
+$Descr A4 11693 8268
+encoding utf-8
+Sheet 1 1
+Title "Z80 computer 2"
+Date "2020-04-29"
+Rev ""
+Comp ""
+Comment1 "License: Creative Commons Attribution Share-Alike (CC BY-SA)"
+Comment2 "Copyright (C) 2020 John Tsiombikas <nuclear@member.fsf.org>"
+Comment3 ""
+Comment4 ""
+$EndDescr
+$Comp
+L CPU:Z80CPU U3
+U 1 1 5EA29512
+P 2000 4050
+F 0 "U3" H 2200 2650 50  0000 C CNN
+F 1 "Z80CPU" H 2000 4050 50  0000 C CNN
+F 2 "" H 2000 4450 50  0001 C CNN
+F 3 "www.zilog.com/manage_directlink.php?filepath=docs/z80/um0080" H 2000 4450 50  0001 C CNN
+       1    2000 4050
+       1    0    0    -1  
+$EndComp
+$Comp
+L Memory_EEPROM:28C256 U6
+U 1 1 5EA2C09A
+P 3850 4400
+F 0 "U6" H 4000 3350 50  0000 C CNN
+F 1 "28C256" V 3850 4400 50  0000 C CNN
+F 2 "" H 3850 4400 50  0001 C CNN
+F 3 "http://ww1.microchip.com/downloads/en/DeviceDoc/doc0006.pdf" H 3850 4400 50  0001 C CNN
+       1    3850 4400
+       1    0    0    -1  
+$EndComp
+$Comp
+L power:GND #PWR08
+U 1 1 5EA2ECD7
+P 2000 5550
+F 0 "#PWR08" H 2000 5300 50  0001 C CNN
+F 1 "GND" H 2005 5377 50  0000 C CNN
+F 2 "" H 2000 5550 50  0001 C CNN
+F 3 "" H 2000 5550 50  0001 C CNN
+       1    2000 5550
+       1    0    0    -1  
+$EndComp
+$Comp
+L power:GND #PWR016
+U 1 1 5EA2F4C0
+P 3850 5500
+F 0 "#PWR016" H 3850 5250 50  0001 C CNN
+F 1 "GND" H 3855 5327 50  0000 C CNN
+F 2 "" H 3850 5500 50  0001 C CNN
+F 3 "" H 3850 5500 50  0001 C CNN
+       1    3850 5500
+       1    0    0    -1  
+$EndComp
+$Comp
+L power:VCC #PWR07
+U 1 1 5EA2FD95
+P 2000 2550
+F 0 "#PWR07" H 2000 2400 50  0001 C CNN
+F 1 "VCC" H 2017 2723 50  0000 C CNN
+F 2 "" H 2000 2550 50  0001 C CNN
+F 3 "" H 2000 2550 50  0001 C CNN
+       1    2000 2550
+       1    0    0    -1  
+$EndComp
+$Comp
+L power:VCC #PWR015
+U 1 1 5EA30021
+P 3850 3300
+F 0 "#PWR015" H 3850 3150 50  0001 C CNN
+F 1 "VCC" H 3867 3473 50  0000 C CNN
+F 2 "" H 3850 3300 50  0001 C CNN
+F 3 "" H 3850 3300 50  0001 C CNN
+       1    3850 3300
+       1    0    0    -1  
+$EndComp
+Wire Wire Line
+       2700 4550 2900 4550
+Wire Wire Line
+       2700 4650 2900 4650
+Wire Wire Line
+       2700 4750 2900 4750
+Wire Wire Line
+       2700 4850 2900 4850
+Wire Wire Line
+       2700 4950 2900 4950
+Wire Wire Line
+       2700 5050 2900 5050
+Wire Wire Line
+       2700 5150 2900 5150
+Wire Wire Line
+       2700 5250 2900 5250
+Text Label 2750 4550 0    50   ~ 0
+D0
+Text Label 2750 4650 0    50   ~ 0
+D1
+Text Label 2750 4750 0    50   ~ 0
+D2
+Text Label 2750 4850 0    50   ~ 0
+D3
+Text Label 2750 4950 0    50   ~ 0
+D4
+Text Label 2750 5050 0    50   ~ 0
+D5
+Text Label 2750 5150 0    50   ~ 0
+D6
+Text Label 2750 5250 0    50   ~ 0
+D7
+Entry Wire Line
+       2900 4550 3000 4650
+Entry Wire Line
+       2900 4650 3000 4750
+Entry Wire Line
+       2900 4750 3000 4850
+Entry Wire Line
+       2900 4850 3000 4950
+Entry Wire Line
+       2900 4950 3000 5050
+Entry Wire Line
+       2900 5050 3000 5150
+Entry Wire Line
+       2900 5150 3000 5250
+Entry Wire Line
+       2900 5250 3000 5350
+Wire Wire Line
+       4250 3500 4450 3500
+Wire Wire Line
+       4250 3600 4450 3600
+Wire Wire Line
+       4250 3700 4450 3700
+Wire Wire Line
+       4250 3800 4450 3800
+Wire Wire Line
+       4250 3900 4450 3900
+Wire Wire Line
+       4250 4000 4450 4000
+Wire Wire Line
+       4250 4100 4450 4100
+Wire Wire Line
+       4250 4200 4450 4200
+Text Label 4300 3500 0    50   ~ 0
+D0
+Text Label 4300 3600 0    50   ~ 0
+D1
+Text Label 4300 3700 0    50   ~ 0
+D2
+Text Label 4300 3800 0    50   ~ 0
+D3
+Text Label 4300 3900 0    50   ~ 0
+D4
+Text Label 4300 4000 0    50   ~ 0
+D5
+Text Label 4300 4100 0    50   ~ 0
+D6
+Text Label 4300 4200 0    50   ~ 0
+D7
+Entry Wire Line
+       4450 3500 4550 3600
+Entry Wire Line
+       4450 3600 4550 3700
+Entry Wire Line
+       4450 3700 4550 3800
+Entry Wire Line
+       4450 3800 4550 3900
+Entry Wire Line
+       4450 3900 4550 4000
+Entry Wire Line
+       4450 4000 4550 4100
+Entry Wire Line
+       4450 4100 4550 4200
+Entry Wire Line
+       4450 4200 4550 4300
+Wire Wire Line
+       2700 2850 2900 2850
+Wire Wire Line
+       2700 2950 2900 2950
+Wire Wire Line
+       2700 3050 2900 3050
+Wire Wire Line
+       2700 3150 2900 3150
+Wire Wire Line
+       2700 3250 2900 3250
+Wire Wire Line
+       2700 3350 2900 3350
+Wire Wire Line
+       2700 3450 2900 3450
+Wire Wire Line
+       2700 3550 2900 3550
+Wire Wire Line
+       2700 3650 2900 3650
+Wire Wire Line
+       2700 3750 2900 3750
+Wire Wire Line
+       2700 3850 2900 3850
+Wire Wire Line
+       2700 3950 2900 3950
+Wire Wire Line
+       2700 4050 2900 4050
+Wire Wire Line
+       2700 4150 2900 4150
+Wire Wire Line
+       2700 4250 2900 4250
+Wire Wire Line
+       2700 4350 2900 4350
+Text Label 2750 2850 0    50   ~ 0
+A0
+Text Label 2750 2950 0    50   ~ 0
+A1
+Text Label 2750 3050 0    50   ~ 0
+A2
+Text Label 2750 3150 0    50   ~ 0
+A3
+Text Label 2750 3250 0    50   ~ 0
+A4
+Text Label 2750 3350 0    50   ~ 0
+A5
+Text Label 2750 3450 0    50   ~ 0
+A6
+Text Label 2750 3550 0    50   ~ 0
+A7
+Text Label 2750 3650 0    50   ~ 0
+A8
+Text Label 2750 3750 0    50   ~ 0
+A9
+Text Label 2750 3850 0    50   ~ 0
+A10
+Text Label 2750 3950 0    50   ~ 0
+A11
+Text Label 2750 4050 0    50   ~ 0
+A12
+Text Label 2750 4150 0    50   ~ 0
+A13
+Text Label 2750 4250 0    50   ~ 0
+A14
+Text Label 2750 4350 0    50   ~ 0
+A15
+Entry Wire Line
+       2900 4350 3000 4250
+Entry Wire Line
+       2900 4250 3000 4150
+Entry Wire Line
+       2900 4150 3000 4050
+Entry Wire Line
+       2900 4050 3000 3950
+Entry Wire Line
+       2900 3950 3000 3850
+Entry Wire Line
+       2900 3850 3000 3750
+Entry Wire Line
+       2900 3750 3000 3650
+Entry Wire Line
+       2900 3650 3000 3550
+Entry Wire Line
+       2900 3550 3000 3450
+Entry Wire Line
+       2900 3450 3000 3350
+Entry Wire Line
+       2900 3350 3000 3250
+Entry Wire Line
+       2900 3250 3000 3150
+Entry Wire Line
+       2900 3150 3000 3050
+Entry Wire Line
+       2900 3050 3000 2950
+Entry Wire Line
+       2900 2950 3000 2850
+Entry Wire Line
+       2900 2850 3000 2750
+Text Label 3450 5850 0    50   ~ 0
+D[0..7]
+Wire Wire Line
+       3450 3500 3250 3500
+Wire Wire Line
+       3450 3600 3250 3600
+Wire Wire Line
+       3450 3700 3250 3700
+Wire Wire Line
+       3450 3800 3250 3800
+Wire Wire Line
+       3450 3900 3250 3900
+Wire Wire Line
+       3450 4000 3250 4000
+Wire Wire Line
+       3450 4100 3250 4100
+Wire Wire Line
+       3450 4200 3250 4200
+Wire Wire Line
+       3450 4300 3250 4300
+Wire Wire Line
+       3450 4400 3250 4400
+Wire Wire Line
+       3450 4500 3250 4500
+Wire Wire Line
+       3450 4600 3250 4600
+Wire Wire Line
+       3450 4700 3250 4700
+Wire Wire Line
+       3450 4800 3250 4800
+Wire Wire Line
+       3450 4900 3250 4900
+Text Label 3300 3500 0    50   ~ 0
+A0
+Text Label 3300 3600 0    50   ~ 0
+A1
+Text Label 3300 3700 0    50   ~ 0
+A2
+Text Label 3300 3800 0    50   ~ 0
+A3
+Text Label 3300 3900 0    50   ~ 0
+A4
+Text Label 3300 4000 0    50   ~ 0
+A5
+Text Label 3300 4100 0    50   ~ 0
+A6
+Text Label 3300 4200 0    50   ~ 0
+A7
+Text Label 3300 4300 0    50   ~ 0
+A8
+Text Label 3300 4400 0    50   ~ 0
+A9
+Text Label 3300 4500 0    50   ~ 0
+A10
+Text Label 3300 4600 0    50   ~ 0
+A11
+Text Label 3300 4700 0    50   ~ 0
+A12
+Text Label 3300 4800 0    50   ~ 0
+A13
+Text Label 3300 4900 0    50   ~ 0
+A14
+Entry Wire Line
+       3150 3400 3250 3500
+Entry Wire Line
+       3150 3500 3250 3600
+Entry Wire Line
+       3150 3600 3250 3700
+Entry Wire Line
+       3150 3700 3250 3800
+Entry Wire Line
+       3150 3800 3250 3900
+Entry Wire Line
+       3150 3900 3250 4000
+Entry Wire Line
+       3150 4000 3250 4100
+Entry Wire Line
+       3150 4100 3250 4200
+Entry Wire Line
+       3150 4200 3250 4300
+Entry Wire Line
+       3150 4300 3250 4400
+Entry Wire Line
+       3150 4400 3250 4500
+Entry Wire Line
+       3150 4500 3250 4600
+Entry Wire Line
+       3150 4600 3250 4700
+Entry Wire Line
+       3150 4700 3250 4800
+Entry Wire Line
+       3150 4800 3250 4900
+Text Label 4250 2600 0    50   ~ 0
+A[0..15]
+$Comp
+L power:VCC #PWR012
+U 1 1 5EA9AA1C
+P 3350 5100
+F 0 "#PWR012" H 3350 4950 50  0001 C CNN
+F 1 "VCC" H 3450 5200 50  0000 C CNN
+F 2 "" H 3350 5100 50  0001 C CNN
+F 3 "" H 3350 5100 50  0001 C CNN
+       1    3350 5100
+       1    0    0    -1  
+$EndComp
+Wire Wire Line
+       3450 5100 3350 5100
+Wire Bus Line
+       3000 2600 3150 2600
+Connection ~ 3150 2600
+Wire Wire Line
+       3450 5300 3150 5300
+Text Label 3150 5300 0    50   ~ 0
+~ROMEN
+Wire Wire Line
+       3450 5200 3300 5200
+Text Label 3300 5200 0    50   ~ 0
+~RD
+Wire Wire Line
+       1300 4550 1000 4550
+Wire Wire Line
+       1300 4650 1000 4650
+Wire Wire Line
+       1300 4750 1000 4750
+Wire Wire Line
+       1300 4850 1000 4850
+Text Label 1150 4550 0    50   ~ 0
+~RD
+Text Label 1150 4650 0    50   ~ 0
+~WR
+Text Label 1050 4750 0    50   ~ 0
+~MREQ
+Text Label 1050 4850 0    50   ~ 0
+~IOREQ
+Text Label 1150 2850 0    50   ~ 0
+~RST
+$Comp
+L z80comp2:mc68681 U8
+U 1 1 5EAC419A
+P 7350 3900
+F 0 "U8" H 7500 2350 50  0000 C CNN
+F 1 "mc68681" V 7350 3900 50  0000 C CNN
+F 2 "" H 7900 3350 50  0001 C CNN
+F 3 "" H 7900 3350 50  0001 C CNN
+       1    7350 3900
+       1    0    0    -1  
+$EndComp
+$Comp
+L z80comp2:sram_um61512ak U7
+U 1 1 5EAC72ED
+P 5550 4300
+F 0 "U7" H 5700 3150 60  0000 C CNN
+F 1 "sram_um61512ak" V 5550 4300 60  0000 C CNN
+F 2 "" H 5450 3500 60  0000 C CNN
+F 3 "" H 5450 3500 60  0000 C CNN
+       1    5550 4300
+       1    0    0    -1  
+$EndComp
+Wire Wire Line
+       6100 3300 6300 3300
+Wire Wire Line
+       6100 3400 6300 3400
+Wire Wire Line
+       6100 3500 6300 3500
+Wire Wire Line
+       6100 3600 6300 3600
+Wire Wire Line
+       6100 3700 6300 3700
+Wire Wire Line
+       6100 3800 6300 3800
+Wire Wire Line
+       6100 3900 6300 3900
+Wire Wire Line
+       6100 4000 6300 4000
+Text Label 6150 3300 0    50   ~ 0
+D0
+Text Label 6150 3400 0    50   ~ 0
+D1
+Text Label 6150 3500 0    50   ~ 0
+D2
+Text Label 6150 3600 0    50   ~ 0
+D3
+Text Label 6150 3700 0    50   ~ 0
+D4
+Text Label 6150 3800 0    50   ~ 0
+D5
+Text Label 6150 3900 0    50   ~ 0
+D6
+Text Label 6150 4000 0    50   ~ 0
+D7
+Entry Wire Line
+       6300 3300 6400 3400
+Entry Wire Line
+       6300 3400 6400 3500
+Entry Wire Line
+       6300 3500 6400 3600
+Entry Wire Line
+       6300 3600 6400 3700
+Entry Wire Line
+       6300 3700 6400 3800
+Entry Wire Line
+       6300 3800 6400 3900
+Entry Wire Line
+       6300 3900 6400 4000
+Entry Wire Line
+       6300 4000 6400 4100
+Wire Wire Line
+       6500 3500 6800 3500
+Wire Wire Line
+       6500 3600 6800 3600
+Wire Wire Line
+       6500 3700 6800 3700
+Wire Wire Line
+       6500 3800 6800 3800
+Wire Wire Line
+       6500 3900 6800 3900
+Wire Wire Line
+       6500 4000 6800 4000
+Wire Wire Line
+       6500 4100 6800 4100
+Wire Wire Line
+       6500 4200 6800 4200
+Text Label 6650 3500 0    50   ~ 0
+D0
+Text Label 6650 3600 0    50   ~ 0
+D1
+Text Label 6650 3700 0    50   ~ 0
+D2
+Text Label 6650 3800 0    50   ~ 0
+D3
+Text Label 6650 3900 0    50   ~ 0
+D4
+Text Label 6650 4000 0    50   ~ 0
+D5
+Text Label 6650 4100 0    50   ~ 0
+D6
+Text Label 6650 4200 0    50   ~ 0
+D7
+Wire Wire Line
+       5000 4800 4650 4800
+Text Label 4650 4800 0    50   ~ 0
+BANKSEL
+Wire Wire Line
+       5000 3300 4800 3300
+Wire Wire Line
+       5000 3400 4800 3400
+Wire Wire Line
+       5000 3500 4800 3500
+Wire Wire Line
+       5000 3600 4800 3600
+Wire Wire Line
+       5000 3700 4800 3700
+Wire Wire Line
+       5000 3800 4800 3800
+Wire Wire Line
+       5000 3900 4800 3900
+Wire Wire Line
+       5000 4000 4800 4000
+Wire Wire Line
+       5000 4100 4800 4100
+Wire Wire Line
+       5000 4200 4800 4200
+Wire Wire Line
+       5000 4300 4800 4300
+Wire Wire Line
+       5000 4400 4800 4400
+Wire Wire Line
+       5000 4500 4800 4500
+Wire Wire Line
+       5000 4600 4800 4600
+Wire Wire Line
+       5000 4700 4800 4700
+Text Label 4850 3300 0    50   ~ 0
+A0
+Text Label 4850 3400 0    50   ~ 0
+A1
+Text Label 4850 3500 0    50   ~ 0
+A2
+Text Label 4850 3600 0    50   ~ 0
+A3
+Text Label 4850 3700 0    50   ~ 0
+A4
+Text Label 4850 3800 0    50   ~ 0
+A5
+Text Label 4850 3900 0    50   ~ 0
+A6
+Text Label 4850 4000 0    50   ~ 0
+A7
+Text Label 4850 4100 0    50   ~ 0
+A8
+Text Label 4850 4200 0    50   ~ 0
+A9
+Text Label 4850 4300 0    50   ~ 0
+A10
+Text Label 4850 4400 0    50   ~ 0
+A11
+Text Label 4850 4500 0    50   ~ 0
+A12
+Text Label 4850 4600 0    50   ~ 0
+A13
+Text Label 4850 4700 0    50   ~ 0
+A14
+Entry Wire Line
+       4700 3200 4800 3300
+Entry Wire Line
+       4700 3300 4800 3400
+Entry Wire Line
+       4700 3400 4800 3500
+Entry Wire Line
+       4700 3500 4800 3600
+Entry Wire Line
+       4700 3600 4800 3700
+Entry Wire Line
+       4700 3700 4800 3800
+Entry Wire Line
+       4700 3800 4800 3900
+Entry Wire Line
+       4700 3900 4800 4000
+Entry Wire Line
+       4700 4000 4800 4100
+Entry Wire Line
+       4700 4100 4800 4200
+Entry Wire Line
+       4700 4200 4800 4300
+Entry Wire Line
+       4700 4300 4800 4400
+Entry Wire Line
+       4700 4400 4800 4500
+Entry Wire Line
+       4700 4500 4800 4600
+Entry Wire Line
+       4700 4600 4800 4700
+Wire Wire Line
+       5000 5050 4900 5050
+Text Label 4900 5050 0    50   ~ 0
+~RD
+Wire Wire Line
+       5000 5150 4900 5150
+Text Label 4900 5150 0    50   ~ 0
+~WR
+Wire Wire Line
+       5000 5250 4750 5250
+Text Label 4750 5250 0    50   ~ 0
+~RAMEN
+$Comp
+L power:VCC #PWR019
+U 1 1 5EB3084D
+P 5550 3050
+F 0 "#PWR019" H 5550 2900 50  0001 C CNN
+F 1 "VCC" H 5567 3223 50  0000 C CNN
+F 2 "" H 5550 3050 50  0001 C CNN
+F 3 "" H 5550 3050 50  0001 C CNN
+       1    5550 3050
+       1    0    0    -1  
+$EndComp
+$Comp
+L power:VCC #PWR017
+U 1 1 5EB32548
+P 4650 5300
+F 0 "#PWR017" H 4650 5150 50  0001 C CNN
+F 1 "VCC" H 4667 5473 50  0000 C CNN
+F 2 "" H 4650 5300 50  0001 C CNN
+F 3 "" H 4650 5300 50  0001 C CNN
+       1    4650 5300
+       1    0    0    -1  
+$EndComp
+Wire Wire Line
+       4650 5300 4650 5350
+Wire Wire Line
+       4650 5350 5000 5350
+$Comp
+L power:GND #PWR020
+U 1 1 5EB37534
+P 5550 5600
+F 0 "#PWR020" H 5550 5350 50  0001 C CNN
+F 1 "GND" H 5555 5427 50  0000 C CNN
+F 2 "" H 5550 5600 50  0001 C CNN
+F 3 "" H 5550 5600 50  0001 C CNN
+       1    5550 5600
+       1    0    0    -1  
+$EndComp
+$Comp
+L power:GND #PWR021
+U 1 1 5EB3BBF0
+P 7350 5600
+F 0 "#PWR021" H 7350 5350 50  0001 C CNN
+F 1 "GND" H 7355 5427 50  0000 C CNN
+F 2 "" H 7350 5600 50  0001 C CNN
+F 3 "" H 7350 5600 50  0001 C CNN
+       1    7350 5600
+       1    0    0    -1  
+$EndComp
+$Comp
+L power:VCC #PWR022
+U 1 1 5EB3BF7A
+P 7350 2400
+F 0 "#PWR022" H 7350 2250 50  0001 C CNN
+F 1 "VCC" H 7367 2573 50  0000 C CNN
+F 2 "" H 7350 2400 50  0001 C CNN
+F 3 "" H 7350 2400 50  0001 C CNN
+       1    7350 2400
+       1    0    0    -1  
+$EndComp
+Wire Wire Line
+       6800 3000 6450 3000
+Wire Wire Line
+       6800 3100 6450 3100
+Wire Wire Line
+       6800 3200 6450 3200
+Wire Wire Line
+       6800 3300 6450 3300
+Text Label 6650 3000 0    50   ~ 0
+A0
+Text Label 6650 3100 0    50   ~ 0
+A1
+Text Label 6650 3200 0    50   ~ 0
+A2
+Text Label 6650 3300 0    50   ~ 0
+A3
+Wire Wire Line
+       6800 4500 6500 4500
+Text Label 6500 4500 0    50   ~ 0
+~UARTEN
+NoConn ~ 11900 2450
+$Comp
+L z80comp2:z80glue U5
+U 1 1 5EB69DED
+P 3850 1550
+F 0 "U5" H 4000 2100 50  0000 C CNN
+F 1 "z80glue" H 3600 900 50  0000 C CNN
+F 2 "" H 3800 1650 50  0001 C CNN
+F 3 "" H 3800 1650 50  0001 C CNN
+       1    3850 1550
+       1    0    0    -1  
+$EndComp
+$Comp
+L power:VCC #PWR013
+U 1 1 5EB7EC44
+P 3850 750
+F 0 "#PWR013" H 3850 600 50  0001 C CNN
+F 1 "VCC" H 3867 923 50  0000 C CNN
+F 2 "" H 3850 750 50  0001 C CNN
+F 3 "" H 3850 750 50  0001 C CNN
+       1    3850 750 
+       1    0    0    -1  
+$EndComp
+$Comp
+L power:GND #PWR014
+U 1 1 5EB872CE
+P 3850 2350
+F 0 "#PWR014" H 3850 2100 50  0001 C CNN
+F 1 "GND" H 3855 2177 50  0000 C CNN
+F 2 "" H 3850 2350 50  0001 C CNN
+F 3 "" H 3850 2350 50  0001 C CNN
+       1    3850 2350
+       1    0    0    -1  
+$EndComp
+Wire Wire Line
+       3300 1000 3100 1000
+Wire Wire Line
+       3300 1100 3100 1100
+Wire Wire Line
+       3300 1200 3100 1200
+Wire Wire Line
+       3300 1300 3100 1300
+Wire Wire Line
+       3300 1400 3100 1400
+Wire Wire Line
+       3300 1700 3100 1700
+Wire Wire Line
+       3300 1800 3100 1800
+Text Label 3150 1000 0    50   ~ 0
+A4
+Text Label 3150 1100 0    50   ~ 0
+A5
+Text Label 3150 1200 0    50   ~ 0
+A6
+Text Label 3150 1300 0    50   ~ 0
+A7
+Text Label 3150 1400 0    50   ~ 0
+A15
+Text Label 3100 1700 0    50   ~ 0
+~MREQ
+Text Label 3100 1800 0    50   ~ 0
+~IOREQ
+Entry Wire Line
+       3000 1500 3100 1400
+Entry Wire Line
+       3000 1400 3100 1300
+Entry Wire Line
+       3000 1300 3100 1200
+Entry Wire Line
+       3000 1200 3100 1100
+Entry Wire Line
+       3000 1100 3100 1000
+Wire Wire Line
+       4400 1500 4700 1500
+Wire Wire Line
+       4400 1300 4700 1300
+Wire Wire Line
+       4400 1400 4700 1400
+Text Label 6500 1300 0    50   ~ 0
+~UARTEN
+Text Label 4400 1400 0    50   ~ 0
+~RAMEN
+Text Label 4400 1500 0    50   ~ 0
+~ROMEN
+Wire Wire Line
+       6800 4400 6650 4400
+Text Label 6650 4400 0    50   ~ 0
+~WR
+Entry Wire Line
+       6350 2900 6450 3000
+Entry Wire Line
+       6350 3000 6450 3100
+Entry Wire Line
+       6350 3100 6450 3200
+Entry Wire Line
+       6350 3200 6450 3300
+Entry Wire Line
+       6400 4300 6500 4200
+Entry Wire Line
+       6400 4200 6500 4100
+Entry Wire Line
+       6400 4100 6500 4000
+Entry Wire Line
+       6400 4000 6500 3900
+Entry Wire Line
+       6400 3900 6500 3800
+Entry Wire Line
+       6400 3800 6500 3700
+Entry Wire Line
+       6400 3700 6500 3600
+Entry Wire Line
+       6400 3600 6500 3500
+Wire Wire Line
+       6800 2700 6650 2700
+Text Label 6650 2700 0    50   ~ 0
+~RST
+Wire Bus Line
+       6400 4400 6100 4400
+Wire Bus Line
+       6100 4400 6100 5850
+Wire Bus Line
+       6100 5850 4550 5850
+Connection ~ 4550 5850
+$Comp
+L Device:Crystal_Small Y1
+U 1 1 5ED63565
+P 6550 5150
+F 0 "Y1" V 6600 5100 50  0000 R CNN
+F 1 "3.6864MHz" V 6700 5450 50  0000 R CNN
+F 2 "" H 6550 5150 50  0001 C CNN
+F 3 "~" H 6550 5150 50  0001 C CNN
+       1    6550 5150
+       0    -1   -1   0   
+$EndComp
+Wire Wire Line
+       6550 5050 6800 5050
+$Comp
+L Device:C_Small C11
+U 1 1 5ED7A206
+P 6550 5400
+F 0 "C11" H 6750 5400 50  0000 R CNN
+F 1 "5pF" H 6750 5500 50  0000 R CNN
+F 2 "" H 6550 5400 50  0001 C CNN
+F 3 "~" H 6550 5400 50  0001 C CNN
+       1    6550 5400
+       1    0    0    1   
+$EndComp
+$Comp
+L Device:C_Small C10
+U 1 1 5ED7B05B
+P 6350 5200
+F 0 "C10" H 6550 5200 50  0000 R CNN
+F 1 "15pF" H 6550 5300 50  0000 R CNN
+F 2 "" H 6350 5200 50  0001 C CNN
+F 3 "~" H 6350 5200 50  0001 C CNN
+       1    6350 5200
+       -1   0    0    1   
+$EndComp
+Wire Wire Line
+       6350 5100 6350 5050
+Wire Wire Line
+       6350 5050 6550 5050
+Wire Wire Line
+       6550 5300 6550 5250
+Connection ~ 6550 5250
+Wire Wire Line
+       7350 5600 6550 5600
+Wire Wire Line
+       6550 5600 6550 5500
+Wire Wire Line
+       6550 5600 6350 5600
+Wire Wire Line
+       6350 5600 6350 5300
+$Comp
+L Interface_UART:MAX232 U9
+U 1 1 5EDB13AC
+P 9300 3900
+F 0 "U9" H 9500 2850 50  0000 C CNN
+F 1 "MAX232" H 9300 4150 50  0000 C CNN
+F 2 "" H 9350 2850 50  0001 L CNN
+F 3 "http://www.ti.com/lit/ds/symlink/max232.pdf" H 9300 4000 50  0001 C CNN
+       1    9300 3900
+       1    0    0    -1  
+$EndComp
+Wire Bus Line
+       4550 5850 4400 5850
+Wire Wire Line
+       7900 3500 8200 3500
+Text Label 7900 3500 0    50   ~ 0
+BANKSEL
+Text Label 7900 3400 0    50   ~ 0
+~RTSA
+Text Label 7900 2700 0    50   ~ 0
+~CTSA
+Text Label 7900 4300 0    50   ~ 0
+TXA
+Text Label 7900 4400 0    50   ~ 0
+RXA
+Wire Wire Line
+       8350 3400 8350 4200
+Wire Wire Line
+       8350 4200 8500 4200
+Wire Wire Line
+       7900 3400 8350 3400
+Wire Wire Line
+       8300 2700 8300 4600
+Wire Wire Line
+       8300 4600 8500 4600
+Wire Wire Line
+       7900 2700 8300 2700
+$Comp
+L power:GND #PWR026
+U 1 1 5EE75D69
+P 9300 5100
+F 0 "#PWR026" H 9300 4850 50  0001 C CNN
+F 1 "GND" H 9305 4927 50  0000 C CNN
+F 2 "" H 9300 5100 50  0001 C CNN
+F 3 "" H 9300 5100 50  0001 C CNN
+       1    9300 5100
+       1    0    0    -1  
+$EndComp
+$Comp
+L power:VCC #PWR025
+U 1 1 5EE7620F
+P 9300 2700
+F 0 "#PWR025" H 9300 2550 50  0001 C CNN
+F 1 "VCC" H 9317 2873 50  0000 C CNN
+F 2 "" H 9300 2700 50  0001 C CNN
+F 3 "" H 9300 2700 50  0001 C CNN
+       1    9300 2700
+       1    0    0    -1  
+$EndComp
+$Comp
+L Device:C C12
+U 1 1 5EE7734D
+P 8500 3150
+F 0 "C12" H 8500 3250 50  0000 L CNN
+F 1 "0.1uF" H 8400 2950 50  0000 L CNN
+F 2 "" H 8538 3000 50  0001 C CNN
+F 3 "~" H 8500 3150 50  0001 C CNN
+       1    8500 3150
+       1    0    0    -1  
+$EndComp
+$Comp
+L Device:C C13
+U 1 1 5EEBDB7E
+P 10100 3150
+F 0 "C13" H 9950 3250 50  0000 L CNN
+F 1 "0.1uF" H 9850 3050 50  0000 L CNN
+F 2 "" H 10138 3000 50  0001 C CNN
+F 3 "~" H 10100 3150 50  0001 C CNN
+       1    10100 3150
+       -1   0    0    -1  
+$EndComp
+$Comp
+L Device:C C14
+U 1 1 5EEBE0D7
+P 10300 3500
+F 0 "C14" V 10250 3600 50  0000 L CNN
+F 1 "0.1uF" V 10250 3200 50  0000 L CNN
+F 2 "" H 10338 3350 50  0001 C CNN
+F 3 "~" H 10300 3500 50  0001 C CNN
+       1    10300 3500
+       0    -1   1    0   
+$EndComp
+Wire Wire Line
+       10150 3500 10100 3500
+Wire Wire Line
+       10100 3800 10150 3800
+$Comp
+L Device:C C15
+U 1 1 5EEC6839
+P 10300 3800
+F 0 "C15" V 10250 3900 50  0000 L CNN
+F 1 "0.1uF" V 10250 3500 50  0000 L CNN
+F 2 "" H 10338 3650 50  0001 C CNN
+F 3 "~" H 10300 3800 50  0001 C CNN
+       1    10300 3800
+       0    -1   1    0   
+$EndComp
+$Comp
+L power:VCC #PWR029
+U 1 1 5EEEF5D1
+P 10650 3400
+F 0 "#PWR029" H 10650 3250 50  0001 C CNN
+F 1 "VCC" H 10667 3573 50  0000 C CNN
+F 2 "" H 10650 3400 50  0001 C CNN
+F 3 "" H 10650 3400 50  0001 C CNN
+       1    10650 3400
+       1    0    0    -1  
+$EndComp
+Wire Wire Line
+       10650 3400 10650 3500
+Wire Wire Line
+       10650 3500 10450 3500
+$Comp
+L power:GND #PWR027
+U 1 1 5EEF812A
+P 10550 3850
+F 0 "#PWR027" H 10550 3600 50  0001 C CNN
+F 1 "GND" H 10555 3677 50  0000 C CNN
+F 2 "" H 10550 3850 50  0001 C CNN
+F 3 "" H 10550 3850 50  0001 C CNN
+       1    10550 3850
+       1    0    0    -1  
+$EndComp
+Wire Wire Line
+       10450 3800 10550 3800
+Wire Wire Line
+       10550 3800 10550 3850
+Wire Wire Line
+       7900 4300 8250 4300
+Wire Wire Line
+       7900 4400 8500 4400
+Wire Wire Line
+       8250 4300 8250 4000
+Wire Wire Line
+       8250 4000 8500 4000
+Text Label 8400 4000 0    50   ~ 0
+TXA
+Text Label 8350 4600 0    50   ~ 0
+~CTSA
+Text Label 8350 4200 0    50   ~ 0
+~RTSA
+Text Label 8350 4400 0    50   ~ 0
+RXA
+$Comp
+L Connector:Conn_01x03_Male J1
+U 1 1 5F03FE41
+P 8550 4850
+F 0 "J1" H 8600 4700 50  0000 R CNN
+F 1 "SERB" H 8650 4600 50  0000 R CNN
+F 2 "" H 8550 4850 50  0001 C CNN
+F 3 "~" H 8550 4850 50  0001 C CNN
+       1    8550 4850
+       -1   0    0    -1  
+$EndComp
+Text Label 8000 4750 0    50   ~ 0
+RXDB
+Text Label 8000 4850 0    50   ~ 0
+TXDB
+Wire Wire Line
+       7900 4650 7900 4850
+Wire Wire Line
+       7900 4850 8350 4850
+Wire Wire Line
+       7900 4550 7950 4550
+Wire Wire Line
+       7950 4550 7950 4750
+Wire Wire Line
+       7950 4750 8350 4750
+$Comp
+L power:GND #PWR024
+U 1 1 5F09F89E
+P 8300 4950
+F 0 "#PWR024" H 8300 4700 50  0001 C CNN
+F 1 "GND" H 8305 4777 50  0000 C CNN
+F 2 "" H 8300 4950 50  0001 C CNN
+F 3 "" H 8300 4950 50  0001 C CNN
+       1    8300 4950
+       1    0    0    -1  
+$EndComp
+$Comp
+L Connector:DB9_Male J2
+U 1 1 5F10B0BC
+P 10850 4600
+F 0 "J2" H 10800 5150 50  0000 L CNN
+F 1 "SERA" H 10750 4050 50  0000 L CNN
+F 2 "" H 10850 4600 50  0001 C CNN
+F 3 " ~" H 10850 4600 50  0001 C CNN
+       1    10850 4600
+       1    0    0    1   
+$EndComp
+Wire Wire Line
+       10100 4000 10250 4000
+Wire Wire Line
+       10100 4400 10550 4400
+Wire Wire Line
+       10250 4000 10250 4600
+Wire Wire Line
+       10250 4600 10550 4600
+Wire Wire Line
+       10100 4200 10200 4200
+Wire Wire Line
+       10200 4200 10200 4500
+Wire Wire Line
+       10200 4500 10550 4500
+Wire Wire Line
+       10100 4600 10150 4600
+Wire Wire Line
+       10150 4600 10150 4700
+Wire Wire Line
+       10150 4700 10550 4700
+$Comp
+L power:GND #PWR028
+U 1 1 5F1878FB
+P 10550 5050
+F 0 "#PWR028" H 10550 4800 50  0001 C CNN
+F 1 "GND" H 10555 4877 50  0000 C CNN
+F 2 "" H 10550 5050 50  0001 C CNN
+F 3 "" H 10550 5050 50  0001 C CNN
+       1    10550 5050
+       1    0    0    -1  
+$EndComp
+Wire Wire Line
+       10550 5000 10550 5050
+NoConn ~ 10550 4200
+NoConn ~ 10550 4300
+NoConn ~ 10550 4800
+NoConn ~ 10550 4900
+Text Label 10350 4400 0    50   ~ 0
+SRTX
+Text Label 10350 4500 0    50   ~ 0
+SRTS
+Text Label 10350 4600 0    50   ~ 0
+STXA
+Text Label 10350 4700 0    50   ~ 0
+SCTS
+Wire Bus Line
+       3000 5850 4550 5850
+Connection ~ 6550 5050
+Connection ~ 6550 5600
+Text Label 6600 5250 0    50   ~ 0
+UCLK
+Wire Wire Line
+       6550 5250 6800 5250
+Connection ~ 7350 5600
+Wire Wire Line
+       1300 4050 1000 4050
+Text Label 1050 4050 0    50   ~ 0
+~WAIT
+$Comp
+L Device:R R3
+U 1 1 5F385448
+P 850 4050
+F 0 "R3" V 950 4050 50  0000 L CNN
+F 1 "4.7k" V 850 3950 50  0000 L CNN
+F 2 "" V 780 4050 50  0001 C CNN
+F 3 "~" H 850 4050 50  0001 C CNN
+       1    850  4050
+       0    -1   -1   0   
+$EndComp
+Text Label 1150 3150 0    50   ~ 0
+CLK
+Text Label 1050 3550 0    50   ~ 0
+~INT
+Wire Wire Line
+       1300 3550 1000 3550
+$Comp
+L power:VCC #PWR01
+U 1 1 5F3DA2B2
+P 700 3350
+F 0 "#PWR01" H 700 3200 50  0001 C CNN
+F 1 "VCC" H 700 3500 50  0000 C CNN
+F 2 "" H 700 3350 50  0001 C CNN
+F 3 "" H 700 3350 50  0001 C CNN
+       1    700  3350
+       1    0    0    -1  
+$EndComp
+$Comp
+L Device:R R2
+U 1 1 5F3D9F65
+P 850 3550
+F 0 "R2" V 950 3550 50  0000 L CNN
+F 1 "4.7k" V 850 3450 50  0000 L CNN
+F 2 "" V 780 3550 50  0001 C CNN
+F 3 "~" H 850 3550 50  0001 C CNN
+       1    850  3550
+       0    -1   1    0   
+$EndComp
+Wire Wire Line
+       700  3350 700  3450
+Connection ~ 700  3550
+Wire Wire Line
+       700  3550 700  4050
+$Comp
+L Device:C C2
+U 1 1 5F442E26
+P 1850 7150
+F 0 "C2" H 1900 7250 50  0000 L CNN
+F 1 "0.1uF" H 1900 7050 50  0000 L CNN
+F 2 "" H 1888 7000 50  0001 C CNN
+F 3 "~" H 1850 7150 50  0001 C CNN
+       1    1850 7150
+       1    0    0    -1  
+$EndComp
+$Comp
+L Device:C C3
+U 1 1 5F444327
+P 2150 7150
+F 0 "C3" H 2200 7250 50  0000 L CNN
+F 1 "0.1uF" H 2200 7050 50  0000 L CNN
+F 2 "" H 2188 7000 50  0001 C CNN
+F 3 "~" H 2150 7150 50  0001 C CNN
+       1    2150 7150
+       1    0    0    -1  
+$EndComp
+$Comp
+L Device:C C4
+U 1 1 5F444547
+P 2450 7150
+F 0 "C4" H 2500 7250 50  0000 L CNN
+F 1 "0.1uF" H 2500 7050 50  0000 L CNN
+F 2 "" H 2488 7000 50  0001 C CNN
+F 3 "~" H 2450 7150 50  0001 C CNN
+       1    2450 7150
+       1    0    0    -1  
+$EndComp
+$Comp
+L Device:C C6
+U 1 1 5F444841
+P 2750 7150
+F 0 "C6" H 2800 7250 50  0000 L CNN
+F 1 "0.1uF" H 2800 7050 50  0000 L CNN
+F 2 "" H 2788 7000 50  0001 C CNN
+F 3 "~" H 2750 7150 50  0001 C CNN
+       1    2750 7150
+       1    0    0    -1  
+$EndComp
+$Comp
+L Device:C C7
+U 1 1 5F444B0C
+P 3050 7150
+F 0 "C7" H 3100 7250 50  0000 L CNN
+F 1 "0.1uF" H 3100 7050 50  0000 L CNN
+F 2 "" H 3088 7000 50  0001 C CNN
+F 3 "~" H 3050 7150 50  0001 C CNN
+       1    3050 7150
+       1    0    0    -1  
+$EndComp
+$Comp
+L Device:C C8
+U 1 1 5F444DC1
+P 3350 7150
+F 0 "C8" H 3400 7250 50  0000 L CNN
+F 1 "0.1uF" H 3400 7050 50  0000 L CNN
+F 2 "" H 3388 7000 50  0001 C CNN
+F 3 "~" H 3350 7150 50  0001 C CNN
+       1    3350 7150
+       1    0    0    -1  
+$EndComp
+$Comp
+L power:GND #PWR010
+U 1 1 5F4451AA
+P 2600 7300
+F 0 "#PWR010" H 2600 7050 50  0001 C CNN
+F 1 "GND" H 2605 7127 50  0000 C CNN
+F 2 "" H 2600 7300 50  0001 C CNN
+F 3 "" H 2600 7300 50  0001 C CNN
+       1    2600 7300
+       1    0    0    -1  
+$EndComp
+$Comp
+L power:VCC #PWR09
+U 1 1 5F4467BC
+P 2600 7000
+F 0 "#PWR09" H 2600 6850 50  0001 C CNN
+F 1 "VCC" H 2600 7150 50  0000 C CNN
+F 2 "" H 2600 7000 50  0001 C CNN
+F 3 "" H 2600 7000 50  0001 C CNN
+       1    2600 7000
+       1    0    0    -1  
+$EndComp
+Wire Wire Line
+       1850 7000 2150 7000
+Connection ~ 2150 7000
+Wire Wire Line
+       2150 7000 2450 7000
+Connection ~ 2450 7000
+Wire Wire Line
+       2450 7000 2600 7000
+Connection ~ 2600 7000
+Wire Wire Line
+       2600 7000 2750 7000
+Connection ~ 2750 7000
+Wire Wire Line
+       2750 7000 3050 7000
+Connection ~ 3050 7000
+Wire Wire Line
+       3050 7000 3350 7000
+Wire Wire Line
+       1850 7300 2150 7300
+Connection ~ 2150 7300
+Wire Wire Line
+       2150 7300 2450 7300
+Connection ~ 2450 7300
+Wire Wire Line
+       2450 7300 2600 7300
+Connection ~ 2600 7300
+Wire Wire Line
+       2600 7300 2750 7300
+Connection ~ 2750 7300
+Wire Wire Line
+       2750 7300 3050 7300
+Connection ~ 3050 7300
+Wire Wire Line
+       3050 7300 3350 7300
+$Comp
+L Device:R R1
+U 1 1 5F463EA2
+P 850 3450
+F 0 "R1" V 950 3450 50  0000 L CNN
+F 1 "4.7k" V 850 3350 50  0000 L CNN
+F 2 "" V 780 3450 50  0001 C CNN
+F 3 "~" H 850 3450 50  0001 C CNN
+       1    850  3450
+       0    -1   -1   0   
+$EndComp
+Connection ~ 700  3450
+Wire Wire Line
+       700  3450 700  3550
+Wire Wire Line
+       1000 3450 1300 3450
+Text Label 1050 3450 0    50   ~ 0
+~NMI
+$Comp
+L 74xx:74LS05 U4
+U 2 1 5F4A99C1
+P 7300 6200
+F 0 "U4" H 7300 6050 50  0000 C CNN
+F 1 "74LS05" H 7400 6350 50  0000 C CNN
+F 2 "" H 7300 6200 50  0001 C CNN
+F 3 "http://www.ti.com/lit/gpn/sn74LS05" H 7300 6200 50  0001 C CNN
+       2    7300 6200
+       -1   0    0    1   
+$EndComp
+$Comp
+L Diode:1N4148 D1
+U 1 1 5F4AD646
+P 8050 6200
+F 0 "D1" H 8050 5984 50  0000 C CNN
+F 1 "1N4148" H 8050 6075 50  0000 C CNN
+F 2 "Diode_THT:D_DO-35_SOD27_P7.62mm_Horizontal" H 8050 6025 50  0001 C CNN
+F 3 "https://assets.nexperia.com/documents/data-sheet/1N4148_1N4448.pdf" H 8050 6200 50  0001 C CNN
+       1    8050 6200
+       -1   0    0    1   
+$EndComp
+$Comp
+L Device:R R8
+U 1 1 5F4AE323
+P 7750 6050
+F 0 "R8" H 7680 6004 50  0000 R CNN
+F 1 "4k7" H 7680 6095 50  0000 R CNN
+F 2 "" V 7680 6050 50  0001 C CNN
+F 3 "~" H 7750 6050 50  0001 C CNN
+       1    7750 6050
+       1    0    0    1   
+$EndComp
+$Comp
+L power:VCC #PWR023
+U 1 1 5F4B4193
+P 7750 5900
+F 0 "#PWR023" H 7750 5750 50  0001 C CNN
+F 1 "VCC" H 7767 6073 50  0000 C CNN
+F 2 "" H 7750 5900 50  0001 C CNN
+F 3 "" H 7750 5900 50  0001 C CNN
+       1    7750 5900
+       1    0    0    -1  
+$EndComp
+Wire Wire Line
+       7900 5250 7900 6200
+Connection ~ 7900 6200
+Wire Wire Line
+       8200 6200 8500 6200
+Text Label 8200 6200 0    50   ~ 0
+UARTEN
+Wire Wire Line
+       7600 6200 7750 6200
+Connection ~ 7750 6200
+Wire Wire Line
+       7750 6200 7900 6200
+Wire Wire Line
+       7000 6200 850  6200
+Wire Wire Line
+       850  6200 850  4250
+Wire Wire Line
+       850  4250 1000 4250
+Wire Wire Line
+       1000 4250 1000 4050
+Connection ~ 1000 4050
+Wire Wire Line
+       4400 1200 4700 1200
+Text Label 4400 1200 0    50   ~ 0
+UARTEN
+Wire Wire Line
+       7900 5150 8050 5150
+Text Label 7900 5150 0    50   ~ 0
+~INT
+Wire Wire Line
+       8300 4950 8350 4950
+Text Notes 3950 2300 0    50   ~ 0
+GAL16V8: glue.pld
+$Comp
+L power:VCC #PWR04
+U 1 1 5F6A583C
+P 1300 5150
+F 0 "#PWR04" H 1300 5000 50  0001 C CNN
+F 1 "VCC" H 1317 5323 50  0000 C CNN
+F 2 "" H 1300 5150 50  0001 C CNN
+F 3 "" H 1300 5150 50  0001 C CNN
+       1    1300 5150
+       1    0    0    -1  
+$EndComp
+Wire Wire Line
+       3300 1600 3100 1600
+Text Label 3200 1600 0    50   ~ 0
+~M1
+Wire Wire Line
+       3300 1900 3100 1900
+Text Label 3100 1900 0    50   ~ 0
+~RFSH
+Wire Wire Line
+       4400 1700 4700 1700
+Text Label 4400 1700 0    50   ~ 0
+~IACK
+Wire Wire Line
+       6800 4700 6600 4700
+Text Label 6600 4700 0    50   ~ 0
+~IACK
+$Comp
+L 74xx:74HC14 U1
+U 6 1 5F7B3414
+P 850 2400
+F 0 "U1" V 650 2400 50  0000 L CNN
+F 1 "74HC14" H 850 2250 50  0000 L CNN
+F 2 "" H 850 2400 50  0001 C CNN
+F 3 "http://www.ti.com/lit/gpn/sn74HC14" H 850 2400 50  0001 C CNN
+       6    850  2400
+       0    1    1    0   
+$EndComp
+Wire Wire Line
+       850  2700 850  3150
+Wire Wire Line
+       850  3150 1300 3150
+Wire Wire Line
+       850  2100 850  1850
+Text Label 850  2050 1    50   ~ 0
+UCLK
+Wire Wire Line
+       1300 1650 1350 1650
+$Comp
+L power:VCC #PWR03
+U 1 1 5F97FBA6
+P 1300 1650
+F 0 "#PWR03" H 1300 1500 50  0001 C CNN
+F 1 "VCC" H 1300 1800 50  0000 C CNN
+F 2 "" H 1300 1650 50  0001 C CNN
+F 3 "" H 1300 1650 50  0001 C CNN
+       1    1300 1650
+       1    0    0    -1  
+$EndComp
+Wire Wire Line
+       750  1350 750  1250
+$Comp
+L power:GND #PWR02
+U 1 1 5F96EC3C
+P 750 1350
+F 0 "#PWR02" H 750 1100 50  0001 C CNN
+F 1 "GND" H 755 1177 50  0000 C CNN
+F 2 "" H 750 1350 50  0001 C CNN
+F 3 "" H 750 1350 50  0001 C CNN
+       1    750  1350
+       1    0    0    -1  
+$EndComp
+Connection ~ 1200 1250
+Wire Wire Line
+       1150 1250 1200 1250
+$Comp
+L Switch:SW_Push SW1
+U 1 1 5F933400
+P 950 1250
+F 0 "SW1" H 950 1535 50  0000 C CNN
+F 1 "RESET" H 950 1444 50  0000 C CNN
+F 2 "" H 950 1450 50  0001 C CNN
+F 3 "~" H 950 1450 50  0001 C CNN
+       1    950  1250
+       1    0    0    -1  
+$EndComp
+Connection ~ 1850 1050
+Wire Wire Line
+       1500 1050 1850 1050
+Wire Wire Line
+       1500 950  1500 1050
+Wire Wire Line
+       1200 950  1500 950 
+Wire Wire Line
+       1200 1250 1350 1250
+$Comp
+L Device:R R5
+U 1 1 5F901EA0
+P 1200 1100
+F 0 "R5" H 1270 1146 50  0000 L CNN
+F 1 "1M" V 1200 1050 50  0000 L CNN
+F 2 "" V 1130 1100 50  0001 C CNN
+F 3 "~" H 1200 1100 50  0001 C CNN
+       1    1200 1100
+       1    0    0    -1  
+$EndComp
+NoConn ~ 1350 1450
+$Comp
+L power:VCC #PWR011
+U 1 1 5F8CF8A4
+P 2700 1150
+F 0 "#PWR011" H 2700 1000 50  0001 C CNN
+F 1 "VCC" H 2717 1323 50  0000 C CNN
+F 2 "" H 2700 1150 50  0001 C CNN
+F 3 "" H 2700 1150 50  0001 C CNN
+       1    2700 1150
+       1    0    0    -1  
+$EndComp
+Text Label 2350 1250 0    50   ~ 0
+RST
+Wire Wire Line
+       2350 1250 2550 1250
+Wire Wire Line
+       2700 1850 1850 1850
+Wire Wire Line
+       2350 1650 2700 1650
+Connection ~ 2700 1450
+Wire Wire Line
+       2700 1450 2700 1650
+$Comp
+L Device:C_Small C5
+U 1 1 5F880397
+P 2700 1750
+F 0 "C5" H 2609 1704 50  0000 R CNN
+F 1 "0.1uF" H 2609 1795 50  0000 R CNN
+F 2 "" H 2700 1750 50  0001 C CNN
+F 3 "~" H 2700 1750 50  0001 C CNN
+       1    2700 1750
+       1    0    0    1   
+$EndComp
+Wire Wire Line
+       2350 1450 2700 1450
+$Comp
+L Device:R R6
+U 1 1 5F8611FE
+P 2700 1300
+F 0 "R6" H 2750 1350 50  0000 L CNN
+F 1 "9.1k" V 2700 1200 50  0000 L CNN
+F 2 "" V 2630 1300 50  0001 C CNN
+F 3 "~" H 2700 1300 50  0001 C CNN
+       1    2700 1300
+       1    0    0    -1  
+$EndComp
+$Comp
+L power:VCC #PWR05
+U 1 1 5F860836
+P 1850 1050
+F 0 "#PWR05" H 1850 900 50  0001 C CNN
+F 1 "VCC" H 1867 1223 50  0000 C CNN
+F 2 "" H 1850 1050 50  0001 C CNN
+F 3 "" H 1850 1050 50  0001 C CNN
+       1    1850 1050
+       1    0    0    -1  
+$EndComp
+$Comp
+L power:GND #PWR06
+U 1 1 5F860553
+P 1850 1850
+F 0 "#PWR06" H 1850 1600 50  0001 C CNN
+F 1 "GND" H 1855 1677 50  0000 C CNN
+F 2 "" H 1850 1850 50  0001 C CNN
+F 3 "" H 1850 1850 50  0001 C CNN
+       1    1850 1850
+       1    0    0    -1  
+$EndComp
+$Comp
+L Timer:LM555 U2
+U 1 1 5F85DCB5
+P 1850 1450
+F 0 "U2" H 2000 1800 50  0000 C CNN
+F 1 "LM555" H 1850 1450 50  0000 C CNN
+F 2 "" H 1850 1450 50  0001 C CNN
+F 3 "http://www.ti.com/lit/ds/symlink/lm555.pdf" H 1850 1450 50  0001 C CNN
+       1    1850 1450
+       1    0    0    -1  
+$EndComp
+$Comp
+L 74xx:74LS05 U4
+U 1 1 5F9CB042
+P 2450 800
+F 0 "U4" H 2450 650 50  0000 C CNN
+F 1 "74LS05" H 2550 950 50  0000 C CNN
+F 2 "" H 2450 800 50  0001 C CNN
+F 3 "http://www.ti.com/lit/gpn/sn74LS05" H 2450 800 50  0001 C CNN
+       1    2450 800 
+       1    0    0    -1  
+$EndComp
+Wire Wire Line
+       2150 800  2150 1050
+Wire Wire Line
+       2150 1050 2550 1050
+Wire Wire Line
+       2550 1050 2550 1250
+Text Label 2850 800  0    50   ~ 0
+~RST
+$Comp
+L Device:R R4
+U 1 1 5FA0761C
+P 1050 2700
+F 0 "R4" H 1120 2746 50  0000 L CNN
+F 1 "4.7k" V 1050 2600 50  0000 L CNN
+F 2 "" V 980 2700 50  0001 C CNN
+F 3 "~" H 1050 2700 50  0001 C CNN
+       1    1050 2700
+       1    0    0    -1  
+$EndComp
+Text Notes 1350 700  0    50   ~ 0
+Power-on reset
+Wire Wire Line
+       2750 800  3000 800 
+Wire Wire Line
+       1050 2850 1300 2850
+Wire Wire Line
+       1050 2550 2000 2550
+Connection ~ 2000 2550
+Connection ~ 2700 1650
+Connection ~ 1850 1850
+$Comp
+L Device:C_Small C1
+U 1 1 5FC80F1C
+P 1200 1700
+F 0 "C1" H 1109 1654 50  0000 R CNN
+F 1 "0.1uF" H 1109 1745 50  0000 R CNN
+F 2 "" H 1200 1700 50  0001 C CNN
+F 3 "~" H 1200 1700 50  0001 C CNN
+       1    1200 1700
+       1    0    0    1   
+$EndComp
+Wire Wire Line
+       1200 1800 1200 1850
+Wire Wire Line
+       1200 1850 1850 1850
+Wire Wire Line
+       1200 1600 1200 1250
+NoConn ~ 1300 5250
+NoConn ~ 1300 4150
+Wire Wire Line
+       1300 3850 1100 3850
+Text Label 1200 3850 0    50   ~ 0
+~M1
+Wire Wire Line
+       1300 3950 1100 3950
+Text Label 1100 3950 0    50   ~ 0
+~RFSH
+Connection ~ 4700 2600
+Wire Bus Line
+       4600 2600 4700 2600
+Wire Bus Line
+       4700 2600 6350 2600
+Wire Bus Line
+       3150 2600 4700 2600
+Connection ~ 3000 2600
+Wire Wire Line
+       3300 2000 3100 2000
+Wire Wire Line
+       3300 2100 3100 2100
+Text Label 3200 2000 0    50   ~ 0
+~RD
+Text Label 3200 2100 0    50   ~ 0
+~WR
+$Comp
+L 74xx:74HC14 U1
+U 5 1 5FEF66B9
+P 5600 1300
+F 0 "U1" H 5550 1450 50  0000 L CNN
+F 1 "74HC14" H 5550 1150 50  0000 L CNN
+F 2 "" H 5600 1300 50  0001 C CNN
+F 3 "http://www.ti.com/lit/gpn/sn74HC14" H 5600 1300 50  0001 C CNN
+       5    5600 1300
+       1    0    0    -1  
+$EndComp
+$Comp
+L Device:C_Small C9
+U 1 1 5FEF828C
+P 5100 1100
+F 0 "C9" H 5008 1054 50  0000 R CNN
+F 1 "0.1uF" H 5008 1145 50  0000 R CNN
+F 2 "" H 5100 1100 50  0001 C CNN
+F 3 "~" H 5100 1100 50  0001 C CNN
+       1    5100 1100
+       -1   0    0    1   
+$EndComp
+$Comp
+L Device:R R7
+U 1 1 5FF0FBDF
+P 4850 1300
+F 0 "R7" V 4750 1250 50  0000 L CNN
+F 1 "120R" V 4850 1200 50  0000 L CNN
+F 2 "" V 4780 1300 50  0001 C CNN
+F 3 "~" H 4850 1300 50  0001 C CNN
+       1    4850 1300
+       0    1    1    0   
+$EndComp
+$Comp
+L power:VCC #PWR018
+U 1 1 5FF26567
+P 5100 1000
+F 0 "#PWR018" H 5100 850 50  0001 C CNN
+F 1 "VCC" H 5117 1173 50  0000 C CNN
+F 2 "" H 5100 1000 50  0001 C CNN
+F 3 "" H 5100 1000 50  0001 C CNN
+       1    5100 1000
+       1    0    0    -1  
+$EndComp
+$Comp
+L 74xx:74HC14 U1
+U 4 1 5FF485F0
+P 6200 1300
+F 0 "U1" H 6150 1450 50  0000 L CNN
+F 1 "74HC14" H 6150 1150 50  0000 L CNN
+F 2 "" H 6200 1300 50  0001 C CNN
+F 3 "http://www.ti.com/lit/gpn/sn74HC14" H 6200 1300 50  0001 C CNN
+       4    6200 1300
+       1    0    0    -1  
+$EndComp
+Wire Wire Line
+       6500 1300 6800 1300
+Wire Wire Line
+       5000 1300 5100 1300
+Wire Wire Line
+       5100 1200 5100 1300
+Wire Bus Line
+       6350 2600 6350 3200
+Wire Bus Line
+       3000 1100 3000 2600
+Wire Bus Line
+       6400 3400 6400 4400
+Wire Bus Line
+       4550 3600 4550 5850
+Wire Bus Line
+       3000 4650 3000 5850
+Wire Bus Line
+       3150 2600 3150 4800
+Wire Bus Line
+       4700 2600 4700 4600
+Wire Bus Line
+       3000 2600 3000 4250
+Connection ~ 5100 1300
+Wire Wire Line
+       5100 1300 5300 1300
+Text Notes 5350 950  0    50   ~ 0
+Delay the UART ~CS~ for a few ns to bring the\ntiming between R/~W~ and ~CS~ within spec\n(this might have been a red herring and not necessary)
+$EndSCHEMATC
diff --git a/rom/Makefile b/rom/Makefile
new file mode 100644 (file)
index 0000000..aae4716
--- /dev/null
@@ -0,0 +1,25 @@
+src = monitor.asm
+obj = $(src:.asm=.o)
+bin = monitor
+
+romtype = 'AT28C256'
+romsize = 2048
+
+AS = vasmz80_oldstyle
+ASFLAGS = -Fvobj
+LD = vlink
+LDFLAGS = -b rawbin1
+
+$(bin): $(obj)
+       $(LD) -o $@ $(LDFLAGS) -Ttext 0 $(obj)
+
+%.o: %.asm
+       $(AS) -o $@ $(ASFLAGS) -L $*.lst $< >/dev/null
+
+.PHONY: clean
+clean:
+       rm -f $(bin) $(obj)
+
+.PHONY: program
+program: $(bin)
+       minipro -p 'AT28C256E' -s -w $<
diff --git a/rom/monitor.asm b/rom/monitor.asm
new file mode 100644 (file)
index 0000000..07dcdb4
--- /dev/null
@@ -0,0 +1,83 @@
+; vi:filetype=z80:
+
+       include "uart.inc"
+main:
+       ld sp, $0
+
+       ; --- initialize channel A ---
+       ; reset TX/RX
+       ld a, UART_CMD_RST_RX
+       out (UART_REG_CMDA), a
+       ld a, UART_CMD_RST_TX
+       out (UART_REG_CMDA), a
+       ; disable TX/RX
+       ld a, UART_CMD_TX_OFF | UART_CMD_RX_OFF
+       out (UART_REG_CMDA), a
+       ; reset MODEA pointer
+       ld a, UART_CMD_RST_MPTR
+       out (UART_REG_CMDA), a
+       ; set the MODEA register
+       ld a, UART_M1_8BIT | UART_M1_NOPAR
+       out (UART_REG_MODEA), a
+       ld a, UART_M2_STOP1
+       out (UART_REG_MODEA), a
+       ; select baud generator set 1
+       xor a
+       out (UART_REG_AUXCTL), a
+       ; set the baud rate
+       ld a, UART_CSEL_TX_9600 | UART_CSEL_RX_9600
+       out (UART_REG_CSELA), a
+       ; enable TX/RX
+       ld a, UART_CMD_TX_ON | UART_CMD_RX_ON
+       out (UART_REG_CMDA), a
+
+       ; --- initialize channel B ---
+       ; reset TX/RX
+       ld a, UART_CMD_RST_RX
+       out (UART_REG_CMDB), a
+       ld a, UART_CMD_RST_TX
+       out (UART_REG_CMDB), a
+       ; disable TX/RX
+       ld a, UART_CMD_TX_OFF | UART_CMD_RX_OFF
+       out (UART_REG_CMDB), a
+       ; reset MODEB pointer
+       ld a, UART_CMD_RST_MPTR
+       out (UART_REG_CMDB), a
+       ; write all 0 to MODEB registers to leave OP1 as a general purpose output
+       xor a
+       out (UART_REG_MODEB), a
+       out (UART_REG_MODEB), a
+       ; set the output port bit 1
+       ld a, 2
+       out (UART_REG_OSET), a
+
+       ld hl, str_hello
+       call uart_putstr
+       ld hl, str_foo
+       call uart_putstr
+
+hlt:   di
+       halt
+       jr hlt
+
+
+uart_putchar:
+       ld b, a
+.wait_txrdy:
+       in a, (UART_REG_STATA)
+       bit 2, a        ; test status bit 2 (TXRDY)
+       jr z, .wait_txrdy
+       ld a, b
+       out (UART_REG_DATAA), a
+       ret
+
+uart_putstr:
+       ld a, (hl)
+       cp a, 0
+       ret z
+       call uart_putchar
+       inc hl
+       jr uart_putstr
+
+str_hello asciiz 'The Z80 says hi!',13,10
+str_foo asciiz 'Foobar',13,10
diff --git a/rom/uart.inc b/rom/uart.inc
new file mode 100644 (file)
index 0000000..ff1868d
--- /dev/null
@@ -0,0 +1,91 @@
+; vi:filetype=z80:
+
+UART_REG_MODEA         equ $00 ; MR1A/MR2A
+UART_REG_STATA         equ $01 ; SRA (rd)
+UART_REG_CSELA         equ $01 ; CSRA (wr)
+UART_REG_CMDA          equ $02 ; CRA (wr)
+UART_REG_DATAA         equ $03 ; RBA (rd) / TBA (wr)
+
+UART_REG_MODEB         equ $08 ; MR1B/MR2B
+UART_REG_STATB         equ $09 ; SRB (rd)
+UART_REG_CSELB         equ $09 ; CSRB (wr)
+UART_REG_CMDB          equ $0a ; CRB (wr)
+UART_REG_DATAB         equ $0b ; RBB (rd) / TBB (wr)
+
+UART_REG_IPCR          equ $04 ; (rd)
+UART_REG_AUXCTL                equ $04 ; ACR (wr)
+UART_REG_ISTAT         equ $05 ; ISR (rd)
+UART_REG_IMASK         equ $05 ; IMR (wr)
+UART_REG_COUNTH                equ $06 ; CUR (rd)
+UART_REG_COUNTL                equ $07 ; CLR (rd)
+UART_REG_CTSETH                equ $06 ; CTUR (wr)
+UART_REG_CTSETL                equ $07 ; CTLR (wr)
+
+UART_REG_IVEC          equ $0c ; IVR
+UART_REG_IPORT         equ $0d ; (rd)
+UART_REG_OPCR          equ $0d ; (wr)
+UART_REG_CSTART_CMD    equ $0e ; (rd)
+UART_REG_CSTOP_CMD     equ $0f ; (rd)
+UART_REG_OSET          equ $0e ; (wr)
+UART_REG_OCLR          equ $0f ; (wr)
+
+
+UART_M1_5BIT           equ $00
+UART_M1_6BIT           equ $01
+UART_M1_7BIT           equ $02
+UART_M1_8BIT           equ $03
+UART_M1_PAREVEN                equ $00
+UART_M1_PARODD         equ $04
+UART_M1_NOPAR          equ $10
+UART_M1_IRQ_RDY                equ $00
+UART_M1_IRQ_FULL       equ $40
+UART_M1_RX_RTS         equ $80
+
+; stop bit count goes in low nibble of MODE2 register
+UART_M2_STOP1          equ $07
+UART_M2_CTS            equ $10
+UART_M2_TX_RTS         equ $20
+UART_M2_ECHO           equ $40
+UART_M2_LOOP_LOCAL     equ $80
+UART_M2_LOOP_REMOTE    equ $c0
+
+UART_CSEL_TX_300       equ $04
+UART_CSEL_RX_300       equ $40
+UART_CSEL_TX_9600      equ $0b
+UART_CSEL_RX_9600      equ $b0
+UART_CSEL_TX_38400_19200 equ $0c
+UART_CSEL_RX_38400_19200 equ $c0
+UART_CSEL_TX_TIMER     equ $0d
+UART_CSEL_RX_TIMER     equ $d0
+
+UART_STAT_RXRDY                equ $01
+UART_STAT_FFULL                equ $02
+UART_STAT_TXRDY                equ $04
+UART_STAT_TXEMPTY      equ $08
+UART_STAT_ERR_OVR      equ $10
+UART_STAT_ERR_PAR      equ $20
+UART_STAT_ERR_FRM      equ $40
+UART_STAT_ERR_BRK      equ $80
+
+UART_CMD_RX_ON         equ $01
+UART_CMD_RX_OFF                equ $02
+UART_CMD_TX_ON         equ $04
+UART_CMD_TX_OFF                equ $08
+UART_CMD_RST_MPTR      equ $10
+UART_CMD_RST_RX                equ $20
+UART_CMD_RST_TX                equ $30
+UART_CMD_RST_ERR       equ $40
+UART_CMD_RST_BRKINT    equ $50
+UART_CMD_START_BRK     equ $60
+UART_CMD_STOP_BRK      equ $70
+
+UART_OPCR_OP2_TXCA16   equ $01
+UART_OPCR_OP2_TXA      equ $02
+UART_OPCR_OP2_RXA      equ $03
+UART_OPCR_OP3_CTR      equ $04
+UART_OPCR_OP3_TXB      equ $08
+UART_OPCR_OP3_RXB      equ $0c
+UART_OPCR_OP4_RXRDYA   equ $10
+UART_OPCR_OP5_RXRDYB   equ $20
+UART_OPCR_OP6_TXRDYA   equ $40
+UART_OPCR_OP7_TXRDYB   equ $80
diff --git a/sym-lib-table b/sym-lib-table
deleted file mode 100644 (file)
index 17d264b..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-(sym_lib_table
-  (lib (name z80comp2)(type Legacy)(uri ${KIPRJMOD}/z80comp2.lib)(options "")(descr ""))
-)
diff --git a/z80comp2-cache.lib b/z80comp2-cache.lib
deleted file mode 100644 (file)
index 1b03780..0000000
+++ /dev/null
@@ -1,594 +0,0 @@
-EESchema-LIBRARY Version 2.4
-#encoding utf-8
-#
-# 74xx_74HC14
-#
-DEF 74xx_74HC14 U 0 40 Y Y 7 L N
-F0 "U" 0 50 50 H V C CNN
-F1 "74xx_74HC14" 0 -50 50 H V C CNN
-F2 "" 0 0 50 H I C CNN
-F3 "" 0 0 50 H I C CNN
-ALIAS 74LS14
-$FPLIST
- DIP*W7.62mm*
-$ENDFPLIST
-DRAW
-S -200 300 200 -300 7 1 10 f
-P 4 1 0 10 -150 150 -150 -150 150 0 -150 150 f
-P 4 2 0 10 -150 150 -150 -150 150 0 -150 150 f
-P 4 3 0 10 -150 150 -150 -150 150 0 -150 150 f
-P 4 4 0 10 -150 150 -150 -150 150 0 -150 150 f
-P 4 5 0 10 -150 150 -150 -150 150 0 -150 150 f
-P 4 6 0 10 -150 150 -150 -150 150 0 -150 150 f
-P 3 1 1 0 -75 -50 -75 50 -25 50 N
-P 4 1 1 0 -100 -50 -25 -50 -25 50 0 50 N
-P 3 2 1 0 -75 -50 -75 50 -25 50 N
-P 4 2 1 0 -100 -50 -25 -50 -25 50 0 50 N
-P 3 3 1 0 -75 -50 -75 50 -25 50 N
-P 4 3 1 0 -100 -50 -25 -50 -25 50 0 50 N
-P 3 4 1 0 -75 -50 -75 50 -25 50 N
-P 4 4 1 0 -100 -50 -25 -50 -25 50 0 50 N
-P 3 5 1 0 -75 -50 -75 50 -25 50 N
-P 4 5 1 0 -100 -50 -25 -50 -25 50 0 50 N
-P 3 6 1 0 -75 -50 -75 50 -25 50 N
-P 4 6 1 0 -100 -50 -25 -50 -25 50 0 50 N
-X ~ 1 -300 0 150 R 50 50 1 0 I
-X ~ 2 300 0 150 L 50 50 1 0 O I
-X ~ 3 -300 0 150 R 50 50 2 0 I
-X ~ 4 300 0 150 L 50 50 2 0 O I
-X ~ 5 -300 0 150 R 50 50 3 0 I
-X ~ 6 300 0 150 L 50 50 3 0 O I
-X ~ 8 300 0 150 L 50 50 4 0 O I
-X ~ 9 -300 0 150 R 50 50 4 0 I
-X ~ 10 300 0 150 L 50 50 5 0 O I
-X ~ 11 -300 0 150 R 50 50 5 0 I
-X ~ 12 300 0 150 L 50 50 6 0 O I
-X ~ 13 -300 0 150 R 50 50 6 0 I
-X VCC 14 0 500 200 D 50 50 7 0 W
-X GND 7 0 -500 200 U 50 50 7 0 W
-ENDDRAW
-ENDDEF
-#
-# 74xx_74LS05
-#
-DEF 74xx_74LS05 U 0 40 Y Y 7 L N
-F0 "U" 0 50 50 H V C CNN
-F1 "74xx_74LS05" 0 -50 50 H V C CNN
-F2 "" 0 0 50 H I C CNN
-F3 "" 0 0 50 H I C CNN
-ALIAS 74LS06 74LS06N
-$FPLIST
- DIP*W7.62mm*
-$ENDFPLIST
-DRAW
-S -200 300 200 -300 7 1 10 f
-P 4 1 0 10 -150 150 -150 -150 150 0 -150 150 f
-P 4 2 0 10 -150 150 -150 -150 150 0 -150 150 f
-P 4 3 0 10 -150 150 -150 -150 150 0 -150 150 f
-P 4 4 0 10 -150 150 -150 -150 150 0 -150 150 f
-P 4 5 0 10 -150 150 -150 -150 150 0 -150 150 f
-P 4 6 0 10 -150 150 -150 -150 150 0 -150 150 f
-X ~ 1 -300 0 150 R 50 50 1 0 I
-X ~ 2 300 0 150 L 50 50 1 0 C I
-X ~ 3 -300 0 150 R 50 50 2 0 I
-X ~ 4 300 0 150 L 50 50 2 0 C I
-X ~ 5 -300 0 150 R 50 50 3 0 I
-X ~ 6 300 0 150 L 50 50 3 0 C I
-X ~ 8 300 0 150 L 50 50 4 0 C I
-X ~ 9 -300 0 150 R 50 50 4 0 I
-X ~ 10 300 0 150 L 50 50 5 0 C I
-X ~ 11 -300 0 150 R 50 50 5 0 I
-X ~ 12 300 0 150 L 50 50 6 0 C I
-X ~ 13 -300 0 150 R 50 50 6 0 I
-X VCC 14 0 500 200 D 50 50 7 0 W
-X GND 7 0 -500 200 U 50 50 7 0 W
-ENDDRAW
-ENDDEF
-#
-# CPU_Z80CPU
-#
-DEF CPU_Z80CPU U 0 40 Y Y 1 F N
-F0 "U" -550 1400 50 H V L CNN
-F1 "CPU_Z80CPU" 250 1400 50 H V L CNN
-F2 "" 0 400 50 H I C CNN
-F3 "" 0 400 50 H I C CNN
-$FPLIST
- DIP*
- PDIP*
-$ENDFPLIST
-DRAW
-S -550 1350 550 -1350 0 1 10 f
-X A11 1 700 100 150 L 50 50 1 1 O
-X D6 10 700 -1100 150 L 50 50 1 1 B
-X VCC 11 0 1500 150 D 50 50 1 1 W
-X D2 12 700 -700 150 L 50 50 1 1 B
-X D7 13 700 -1200 150 L 50 50 1 1 B
-X D0 14 700 -500 150 L 50 50 1 1 B
-X D1 15 700 -600 150 L 50 50 1 1 B
-X ~INT~ 16 -700 500 150 R 50 50 1 1 I
-X ~NMI~ 17 -700 600 150 R 50 50 1 1 I
-X ~HALT~ 18 -700 -100 150 R 50 50 1 1 O
-X ~MREQ~ 19 -700 -700 150 R 50 50 1 1 O
-X A12 2 700 0 150 L 50 50 1 1 O
-X ~IORQ~ 20 -700 -800 150 R 50 50 1 1 O
-X ~RD~ 21 -700 -500 150 R 50 50 1 1 O
-X ~WR~ 22 -700 -600 150 R 50 50 1 1 O
-X ~BUSACK~ 23 -700 -1200 150 R 50 50 1 1 O
-X ~WAIT~ 24 -700 0 150 R 50 50 1 1 I
-X ~BUSRQ~ 25 -700 -1100 150 R 50 50 1 1 I
-X ~RESET~ 26 -700 1200 150 R 50 50 1 1 I
-X ~M1~ 27 -700 200 150 R 50 50 1 1 O
-X ~RFSH~ 28 -700 100 150 R 50 50 1 1 O
-X GND 29 0 -1500 150 U 50 50 1 1 W
-X A13 3 700 -100 150 L 50 50 1 1 O
-X A0 30 700 1200 150 L 50 50 1 1 O
-X A1 31 700 1100 150 L 50 50 1 1 O
-X A2 32 700 1000 150 L 50 50 1 1 O
-X A3 33 700 900 150 L 50 50 1 1 O
-X A4 34 700 800 150 L 50 50 1 1 O
-X A5 35 700 700 150 L 50 50 1 1 O
-X A6 36 700 600 150 L 50 50 1 1 O
-X A7 37 700 500 150 L 50 50 1 1 O
-X A8 38 700 400 150 L 50 50 1 1 O
-X A9 39 700 300 150 L 50 50 1 1 O
-X A14 4 700 -200 150 L 50 50 1 1 O
-X A10 40 700 200 150 L 50 50 1 1 O
-X A15 5 700 -300 150 L 50 50 1 1 O
-X ~CLK~ 6 -700 900 150 R 50 50 1 1 I C
-X D4 7 700 -900 150 L 50 50 1 1 B
-X D3 8 700 -800 150 L 50 50 1 1 B
-X D5 9 700 -1000 150 L 50 50 1 1 B
-ENDDRAW
-ENDDEF
-#
-# Connector_Conn_01x03_Male
-#
-DEF Connector_Conn_01x03_Male J 0 40 Y N 1 F N
-F0 "J" 0 200 50 H V C CNN
-F1 "Connector_Conn_01x03_Male" 0 -200 50 H V C CNN
-F2 "" 0 0 50 H I C CNN
-F3 "" 0 0 50 H I C CNN
-$FPLIST
- Connector*:*_1x??_*
-$ENDFPLIST
-DRAW
-S 34 -95 0 -105 1 1 6 F
-S 34 5 0 -5 1 1 6 F
-S 34 105 0 95 1 1 6 F
-P 2 1 1 6 50 -100 34 -100 N
-P 2 1 1 6 50 0 34 0 N
-P 2 1 1 6 50 100 34 100 N
-X Pin_1 1 200 100 150 L 50 50 1 1 P
-X Pin_2 2 200 0 150 L 50 50 1 1 P
-X Pin_3 3 200 -100 150 L 50 50 1 1 P
-ENDDRAW
-ENDDEF
-#
-# Connector_DB9_Male
-#
-DEF Connector_DB9_Male J 0 40 Y N 1 F N
-F0 "J" 0 550 50 H V C CNN
-F1 "Connector_DB9_Male" 0 -575 50 H V C CNN
-F2 "" 0 0 50 H I C CNN
-F3 "" 0 0 50 H I C CNN
-$FPLIST
- DSUB*Male*
-$ENDFPLIST
-DRAW
-C -70 -400 30 0 1 0 F
-C -70 -200 30 0 1 0 F
-C -70 0 30 0 1 0 F
-C -70 200 30 0 1 0 F
-C -70 400 30 0 1 0 F
-C 50 -300 30 0 1 0 F
-C 50 -100 30 0 1 0 F
-C 50 100 30 0 1 0 F
-C 50 300 30 0 1 0 F
-P 2 0 1 0 -150 -400 -100 -400 N
-P 2 0 1 0 -150 -300 20 -300 N
-P 2 0 1 0 -150 -200 -100 -200 N
-P 2 0 1 0 -150 -100 20 -100 N
-P 2 0 1 0 -150 0 -100 0 N
-P 2 0 1 0 -150 100 20 100 N
-P 2 0 1 0 -150 200 -100 200 N
-P 2 0 1 0 -150 300 20 300 N
-P 2 0 1 0 -150 400 -100 400 N
-P 5 0 1 10 -150 -525 -150 525 150 375 150 -375 -150 -525 f
-X 1 1 -300 -400 150 R 50 50 1 1 P
-X 2 2 -300 -200 150 R 50 50 1 1 P
-X 3 3 -300 0 150 R 50 50 1 1 P
-X 4 4 -300 200 150 R 50 50 1 1 P
-X 5 5 -300 400 150 R 50 50 1 1 P
-X 6 6 -300 -300 150 R 50 50 1 1 P
-X 7 7 -300 -100 150 R 50 50 1 1 P
-X 8 8 -300 100 150 R 50 50 1 1 P
-X 9 9 -300 300 150 R 50 50 1 1 P
-ENDDRAW
-ENDDEF
-#
-# Device_C
-#
-DEF Device_C C 0 10 N Y 1 F N
-F0 "C" 25 100 50 H V L CNN
-F1 "Device_C" 25 -100 50 H V L CNN
-F2 "" 38 -150 50 H I C CNN
-F3 "" 0 0 50 H I C CNN
-$FPLIST
- C_*
-$ENDFPLIST
-DRAW
-P 2 0 1 20 -80 -30 80 -30 N
-P 2 0 1 20 -80 30 80 30 N
-X ~ 1 0 150 110 D 50 50 1 1 P
-X ~ 2 0 -150 110 U 50 50 1 1 P
-ENDDRAW
-ENDDEF
-#
-# Device_C_Small
-#
-DEF Device_C_Small C 0 10 N N 1 F N
-F0 "C" 10 70 50 H V L CNN
-F1 "Device_C_Small" 10 -80 50 H V L CNN
-F2 "" 0 0 50 H I C CNN
-F3 "" 0 0 50 H I C CNN
-$FPLIST
- C_*
-$ENDFPLIST
-DRAW
-P 2 0 1 13 -60 -20 60 -20 N
-P 2 0 1 12 -60 20 60 20 N
-X ~ 1 0 100 80 D 50 50 1 1 P
-X ~ 2 0 -100 80 U 50 50 1 1 P
-ENDDRAW
-ENDDEF
-#
-# Device_Crystal_Small
-#
-DEF Device_Crystal_Small Y 0 40 N N 1 F N
-F0 "Y" 0 100 50 H V C CNN
-F1 "Device_Crystal_Small" 0 -100 50 H V C CNN
-F2 "" 0 0 50 H I C CNN
-F3 "" 0 0 50 H I C CNN
-$FPLIST
- Crystal*
-$ENDFPLIST
-DRAW
-S -30 -60 30 60 0 1 0 N
-P 2 0 1 15 -50 -30 -50 30 N
-P 2 0 1 15 50 -30 50 30 N
-X 1 1 -100 0 50 R 50 50 1 1 P
-X 2 2 100 0 50 L 50 50 1 1 P
-ENDDRAW
-ENDDEF
-#
-# Device_R
-#
-DEF Device_R R 0 0 N Y 1 F N
-F0 "R" 80 0 50 V V C CNN
-F1 "Device_R" 0 0 50 V V C CNN
-F2 "" -70 0 50 V I C CNN
-F3 "" 0 0 50 H I C CNN
-$FPLIST
- R_*
-$ENDFPLIST
-DRAW
-S -40 -100 40 100 0 1 10 N
-X ~ 1 0 150 50 D 50 50 1 1 P
-X ~ 2 0 -150 50 U 50 50 1 1 P
-ENDDRAW
-ENDDEF
-#
-# Diode_1N4148
-#
-DEF Diode_1N4148 D 0 40 N N 1 F N
-F0 "D" 0 100 50 H V C CNN
-F1 "Diode_1N4148" 0 -100 50 H V C CNN
-F2 "Diode_THT:D_DO-35_SOD27_P7.62mm_Horizontal" 0 -175 50 H I C CNN
-F3 "" 0 0 50 H I C CNN
-ALIAS 1N4448 1N4149 1N4151 1N914 BA243 BA244 BA282 BA283 BAV17 BAV18 BAV19 BAV20 BAV21 BAW75 BAW76 BAY93
-$FPLIST
- D*DO?35*
-$ENDFPLIST
-DRAW
-P 2 0 1 8 -50 50 -50 -50 N
-P 2 0 1 0 50 0 -50 0 N
-P 4 0 1 8 50 50 50 -50 -50 0 50 50 N
-X K 1 -150 0 100 R 50 50 1 1 P
-X A 2 150 0 100 L 50 50 1 1 P
-ENDDRAW
-ENDDEF
-#
-# Interface_UART_MAX232
-#
-DEF Interface_UART_MAX232 U 0 40 Y Y 1 F N
-F0 "U" -100 1125 50 H V R CNN
-F1 "Interface_UART_MAX232" -100 1050 50 H V R CNN
-F2 "" 50 -1050 50 H I L CNN
-F3 "" 0 100 50 H I C CNN
-ALIAS MAX232I MAX202 ADM232A MAX3232 ICL3232
-$FPLIST
- SOIC*P1.27mm*
- DIP*W7.62mm*
- TSSOP*4.4x5mm*P0.65mm*
-$ENDFPLIST
-DRAW
-C -100 -700 25 0 1 10 N
-C -100 -500 25 0 1 10 N
-C 25 -300 25 0 1 10 N
-C 25 -100 25 0 1 10 N
-T 0 -450 -900 50 0 0 0 LOGIC Normal 0 C C
-T 0 450 -900 50 0 0 0 RS232 Normal 0 C C
-S -600 -1000 600 1000 0 1 10 f
-P 2 0 1 10 -150 -300 -325 -300 N
-P 2 0 1 10 -150 -100 -325 -100 N
-P 2 0 1 10 -125 -700 -325 -700 N
-P 2 0 1 10 -125 -500 -325 -500 N
-P 2 0 1 10 50 -300 250 -300 N
-P 2 0 1 10 50 -100 250 -100 N
-P 2 0 1 10 75 -700 250 -700 N
-P 2 0 1 10 75 -500 250 -500 N
-P 4 0 1 10 -150 -225 -150 -375 0 -300 -150 -225 N
-P 4 0 1 10 -150 -25 -150 -175 0 -100 -150 -25 N
-P 4 0 1 10 75 -625 75 -775 -75 -700 75 -625 N
-P 4 0 1 10 75 -425 75 -575 -75 -500 75 -425 N
-X C1+ 1 -800 900 200 R 50 50 1 1 P
-X T2IN 10 -800 -300 200 R 50 50 1 1 I
-X T1IN 11 -800 -100 200 R 50 50 1 1 I
-X R1OUT 12 -800 -500 200 R 50 50 1 1 O
-X R1IN 13 800 -500 200 L 50 50 1 1 I
-X T1OUT 14 800 -100 200 L 50 50 1 1 O
-X GND 15 0 -1200 200 U 50 50 1 1 W
-X VCC 16 0 1200 200 D 50 50 1 1 W
-X VS+ 2 800 400 200 L 50 50 1 1 w
-X C1- 3 -800 600 200 R 50 50 1 1 P
-X C2+ 4 800 900 200 L 50 50 1 1 P
-X C2- 5 800 600 200 L 50 50 1 1 P
-X VS- 6 800 100 200 L 50 50 1 1 w
-X T2OUT 7 800 -300 200 L 50 50 1 1 O
-X R2IN 8 800 -700 200 L 50 50 1 1 I
-X R2OUT 9 -800 -700 200 R 50 50 1 1 O
-ENDDRAW
-ENDDEF
-#
-# Memory_EEPROM_28C256
-#
-DEF Memory_EEPROM_28C256 U 0 20 Y Y 1 F N
-F0 "U" -300 1050 50 H V C CNN
-F1 "Memory_EEPROM_28C256" 100 -1050 50 H V L CNN
-F2 "" 0 0 50 H I C CNN
-F3 "" 0 0 50 H I C CNN
-$FPLIST
- DIP*W15.24mm*
- SOIC*7.5x17.9mm*P1.27mm*
-$ENDFPLIST
-DRAW
-S -300 1000 300 -1000 1 1 10 f
-X A14 1 -400 -500 100 R 50 50 1 1 I
-X A0 10 -400 900 100 R 50 50 1 1 I
-X D0 11 400 900 100 L 50 50 1 1 T
-X D1 12 400 800 100 L 50 50 1 1 T
-X D2 13 400 700 100 L 50 50 1 1 T
-X GND 14 0 -1100 100 U 50 50 1 1 W
-X D3 15 400 600 100 L 50 50 1 1 T
-X D4 16 400 500 100 L 50 50 1 1 T
-X D5 17 400 400 100 L 50 50 1 1 T
-X D6 18 400 300 100 L 50 50 1 1 T
-X D7 19 400 200 100 L 50 50 1 1 T
-X A12 2 -400 -300 100 R 50 50 1 1 I
-X ~CS 20 -400 -900 100 R 50 50 1 1 I
-X A10 21 -400 -100 100 R 50 50 1 1 I
-X ~OE 22 -400 -800 100 R 50 50 1 1 I
-X A11 23 -400 -200 100 R 50 50 1 1 I
-X A9 24 -400 0 100 R 50 50 1 1 I
-X A8 25 -400 100 100 R 50 50 1 1 I
-X A13 26 -400 -400 100 R 50 50 1 1 I
-X ~WE 27 -400 -700 100 R 50 50 1 1 I
-X VCC 28 0 1100 100 D 50 50 1 1 W
-X A7 3 -400 200 100 R 50 50 1 1 I
-X A6 4 -400 300 100 R 50 50 1 1 I
-X A5 5 -400 400 100 R 50 50 1 1 I
-X A4 6 -400 500 100 R 50 50 1 1 I
-X A3 7 -400 600 100 R 50 50 1 1 I
-X A2 8 -400 700 100 R 50 50 1 1 I
-X A1 9 -400 800 100 R 50 50 1 1 I
-ENDDRAW
-ENDDEF
-#
-# Switch_SW_Push
-#
-DEF Switch_SW_Push SW 0 40 N N 1 F N
-F0 "SW" 50 100 50 H V L CNN
-F1 "Switch_SW_Push" 0 -60 50 H V C CNN
-F2 "" 0 200 50 H I C CNN
-F3 "" 0 200 50 H I C CNN
-DRAW
-C -80 0 20 0 1 0 N
-C 80 0 20 0 1 0 N
-P 2 0 1 0 0 50 0 120 N
-P 2 0 1 0 100 50 -100 50 N
-X 1 1 -200 0 100 R 50 50 0 1 P
-X 2 2 200 0 100 L 50 50 0 1 P
-ENDDRAW
-ENDDEF
-#
-# Timer_LM555
-#
-DEF Timer_LM555 U 0 20 Y Y 1 F N
-F0 "U" -400 350 50 H V L CNN
-F1 "Timer_LM555" 100 350 50 H V L CNN
-F2 "" 0 0 50 H I C CNN
-F3 "" 0 0 50 H I C CNN
-ALIAS ICM7555 LMC555xM LMC555xMM LMC555xN MC1455 TLC555CD TLC555CP TLC555CPS NA555 NE555 SE555 SA555
-$FPLIST
- SOIC*3.9x4.9mm*P1.27mm*
- DIP*W7.62mm*
- TSSOP*3x3mm*P0.65mm*
-$ENDFPLIST
-DRAW
-S -350 -300 350 300 0 1 10 f
-S -350 -300 350 300 0 1 10 f
-X GND 1 0 -400 100 U 50 50 0 0 W
-X VCC 8 0 400 100 D 50 50 0 0 W
-X TR 2 -500 200 150 R 50 50 1 1 I
-X Q 3 500 200 150 L 50 50 1 1 O
-X R 4 -500 -200 150 R 50 50 1 1 I I
-X CV 5 -500 0 150 R 50 50 1 1 I
-X THR 6 500 -200 150 L 50 50 1 1 I
-X DIS 7 500 0 150 L 50 50 1 1 I
-ENDDRAW
-ENDDEF
-#
-# power_GND
-#
-DEF power_GND #PWR 0 0 Y Y 1 F P
-F0 "#PWR" 0 -250 50 H I C CNN
-F1 "power_GND" 0 -150 50 H V C CNN
-F2 "" 0 0 50 H I C CNN
-F3 "" 0 0 50 H I C CNN
-DRAW
-P 6 0 1 0 0 0 0 -50 50 -50 0 -100 -50 -50 0 -50 N
-X GND 1 0 0 0 D 50 50 1 1 W N
-ENDDRAW
-ENDDEF
-#
-# power_VCC
-#
-DEF power_VCC #PWR 0 0 Y Y 1 F P
-F0 "#PWR" 0 -150 50 H I C CNN
-F1 "power_VCC" 0 150 50 H V C CNN
-F2 "" 0 0 50 H I C CNN
-F3 "" 0 0 50 H I C CNN
-DRAW
-C 0 75 25 0 1 0 N
-P 2 0 1 0 0 0 0 50 N
-X VCC 1 0 0 0 U 50 50 1 1 W N
-ENDDRAW
-ENDDEF
-#
-# z80comp2_mc68681
-#
-DEF z80comp2_mc68681 U 0 40 Y Y 1 F N
-F0 "U" 150 1350 50 H V C CNN
-F1 "z80comp2_mc68681" -250 1350 50 H V C CNN
-F2 "" 550 -550 50 H I C CNN
-F3 "" 550 -550 50 H I C CNN
-DRAW
-S -350 1300 350 -1500 0 1 0 f
-X RS1 1 -550 900 200 R 50 50 1 1 I
-X RXDB 10 550 -650 200 L 50 50 1 1 P
-X TXDB 11 550 -750 200 L 50 50 1 1 P
-X OP1 12 550 400 200 L 50 50 1 1 O
-X OP3 13 550 200 200 L 50 50 1 1 O
-X OP5 14 550 0 200 L 50 50 1 1 O
-X OP7 15 550 -200 200 L 50 50 1 1 O
-X D1 16 -550 300 200 R 50 50 1 1 B
-X D3 17 -550 100 200 R 50 50 1 1 B
-X D5 18 -550 -100 200 R 50 50 1 1 B
-X D7 19 -550 -300 200 R 50 50 1 1 B
-X IP3 2 550 900 200 L 50 50 1 1 I
-X GND 20 0 -1700 200 U 50 50 1 1 W
-X ~IRQ 21 550 -1250 200 L 50 50 1 1 C
-X D6 22 -550 -200 200 R 50 50 1 1 B
-X D4 23 -550 0 200 R 50 50 1 1 B
-X D2 24 -550 200 200 R 50 50 1 1 B
-X D0 25 -550 400 200 R 50 50 1 1 B
-X OP6 26 550 -100 200 L 50 50 1 1 O
-X OP4 27 550 100 200 L 50 50 1 1 O
-X OP2 28 550 300 200 L 50 50 1 1 O
-X OP0 29 550 500 200 L 50 50 1 1 O
-X RS2 3 -550 800 200 R 50 50 1 1 I
-X TXDA 30 550 -400 200 L 50 50 1 1 P
-X RXDA 31 550 -500 200 L 50 50 1 1 P
-X X1/CLK 32 -550 -1150 200 R 50 50 1 1 I
-X X2 33 -550 -1350 200 R 50 50 1 1 O
-X ~RST 34 -550 1200 200 R 50 50 1 1 I
-X ~CS 35 -550 -600 200 R 50 50 1 1 I
-X IP2 36 550 1000 200 L 50 50 1 1 I
-X ~IACK 37 -550 -800 200 R 50 50 1 1 I
-X IP5 38 550 700 200 L 50 50 1 1 I
-X IP4 39 550 800 200 L 50 50 1 1 I
-X IP1 4 550 1100 200 L 50 50 1 1 I
-X VCC 40 0 1500 200 D 50 50 1 1 W
-X RS3 5 -550 700 200 R 50 50 1 1 I
-X RD4 6 -550 600 200 R 50 50 1 1 I
-X IP0 7 550 1200 200 L 50 50 1 1 I
-X R/~W 8 -550 -500 200 R 50 50 1 1 I
-X ~DTACK 9 550 -1350 200 L 50 50 1 1 C
-ENDDRAW
-ENDDEF
-#
-# z80comp2_sram_um61512ak
-#
-DEF z80comp2_sram_um61512ak U 0 40 Y Y 1 F N
-F0 "U" 100 -1200 60 H V C CNN
-F1 "z80comp2_sram_um61512ak" 0 -50 60 V V C CNN
-F2 "" -100 -800 60 H V C CNN
-F3 "" -100 -800 60 H V C CNN
-DRAW
-S -350 1050 350 -1100 0 1 0 f
-X A2 10 -550 800 200 R 50 50 1 1 I
-X A1 11 -550 900 200 R 50 50 1 1 I
-X A0 12 -550 1000 200 R 50 50 1 1 I
-X D0 13 550 1000 200 L 50 50 1 1 B
-X D1 14 550 900 200 L 50 50 1 1 B
-X D2 15 550 800 200 L 50 50 1 1 B
-X GND 16 0 -1300 200 U 50 50 1 1 W
-X D3 17 550 700 200 L 50 50 1 1 B
-X D4 18 550 600 200 L 50 50 1 1 B
-X D5 19 550 500 200 L 50 50 1 1 B
-X D6 20 550 400 200 L 50 50 1 1 B
-X D7 21 550 300 200 L 50 50 1 1 B
-X ~CE1 22 -550 -950 200 R 50 50 1 1 I I
-X A10 23 -550 0 200 R 50 50 1 1 I
-X ~OE 24 -550 -750 200 R 50 50 1 1 I I
-X A11 25 -550 -100 200 R 50 50 1 1 I
-X A9 26 -550 100 200 R 50 50 1 1 I
-X A8 27 -550 200 200 R 50 50 1 1 I
-X A13 28 -550 -300 200 R 50 50 1 1 I
-X ~WE 29 -550 -850 200 R 50 50 1 1 I I
-X A14 3 -550 -400 200 R 50 50 1 1 I
-X CE2 30 -550 -1050 200 R 50 50 1 1 I
-X A15 31 -550 -500 200 R 50 50 1 1 I
-X VCC 32 0 1250 200 D 50 50 1 1 W
-X A12 4 -550 -200 200 R 50 50 1 1 I
-X A7 5 -550 300 200 R 50 50 1 1 I
-X A6 6 -550 400 200 R 50 50 1 1 I
-X A5 7 -550 500 200 R 50 50 1 1 I
-X A4 8 -550 600 200 R 50 50 1 1 I
-X A3 9 -550 700 200 R 50 50 1 1 I
-ENDDRAW
-ENDDEF
-#
-# z80comp2_z80glue
-#
-DEF z80comp2_z80glue U 0 40 Y Y 1 F N
-F0 "U" 100 650 50 H V C CNN
-F1 "z80comp2_z80glue" -200 650 50 H V C CNN
-F2 "" -350 -400 50 H I C CNN
-F3 "" -350 -400 50 H I C CNN
-DRAW
-S -350 600 350 -600 0 1 0 f
-X A4 1 -550 550 200 R 50 50 1 1 I
-X GND 10 0 -800 200 U 50 50 1 1 W
-X ~RFSH 11 -550 -350 200 R 50 50 1 1 I
-X ~RD 12 -550 -450 200 R 50 50 1 1 I
-X ~WR 13 -550 -550 200 R 50 50 1 1 I
-X NC 14 200 -250 200 L 50 50 1 1 N N
-X ~IACK 15 550 -150 200 L 50 50 1 1 O
-X UARTEN 16 550 350 200 L 50 50 1 1 O
-X ~UARTEN 17 550 250 200 L 50 50 1 1 O
-X ~RAMEN 18 550 150 200 L 50 50 1 1 O
-X ~ROMEN 19 550 50 200 L 50 50 1 1 O
-X A5 2 -550 450 200 R 50 50 1 1 I
-X A6 3 -550 350 200 R 50 50 1 1 I
-X A7 4 -550 250 200 R 50 50 1 1 I
-X A15 5 -550 150 200 R 50 50 1 1 I
-X NC 6 200 -350 200 L 50 50 1 1 N N
-X ~M1 7 -550 -50 200 R 50 50 1 1 I
-X ~MREQ 8 -550 -150 200 R 50 50 1 1 I
-X ~IOREQ 9 -550 -250 200 R 50 50 1 1 I
-X VCC ~ 0 800 200 D 50 50 1 1 W
-ENDDRAW
-ENDDEF
-#
-#End Library
diff --git a/z80comp2.kicad_pcb b/z80comp2.kicad_pcb
deleted file mode 100644 (file)
index 02c8ecb..0000000
+++ /dev/null
@@ -1 +0,0 @@
-(kicad_pcb (version 4) (host kicad "dummy file") )
diff --git a/z80comp2.lib b/z80comp2.lib
deleted file mode 100644 (file)
index caf0107..0000000
+++ /dev/null
@@ -1,130 +0,0 @@
-EESchema-LIBRARY Version 2.4
-#encoding utf-8
-#
-# mc68681
-#
-DEF mc68681 U 0 40 Y Y 1 F N
-F0 "U" 150 1350 50 H V C CNN
-F1 "mc68681" -250 1350 50 H V C CNN
-F2 "" 550 -550 50 H I C CNN
-F3 "" 550 -550 50 H I C CNN
-DRAW
-S -350 1300 350 -1500 0 1 0 f
-X RS1 1 -550 900 200 R 50 50 1 1 I
-X RXDB 10 550 -650 200 L 50 50 1 1 P
-X TXDB 11 550 -750 200 L 50 50 1 1 P
-X OP1 12 550 400 200 L 50 50 1 1 O
-X OP3 13 550 200 200 L 50 50 1 1 O
-X OP5 14 550 0 200 L 50 50 1 1 O
-X OP7 15 550 -200 200 L 50 50 1 1 O
-X D1 16 -550 300 200 R 50 50 1 1 B
-X D3 17 -550 100 200 R 50 50 1 1 B
-X D5 18 -550 -100 200 R 50 50 1 1 B
-X D7 19 -550 -300 200 R 50 50 1 1 B
-X IP3 2 550 900 200 L 50 50 1 1 I
-X GND 20 0 -1700 200 U 50 50 1 1 W
-X ~IRQ 21 550 -1250 200 L 50 50 1 1 C
-X D6 22 -550 -200 200 R 50 50 1 1 B
-X D4 23 -550 0 200 R 50 50 1 1 B
-X D2 24 -550 200 200 R 50 50 1 1 B
-X D0 25 -550 400 200 R 50 50 1 1 B
-X OP6 26 550 -100 200 L 50 50 1 1 O
-X OP4 27 550 100 200 L 50 50 1 1 O
-X OP2 28 550 300 200 L 50 50 1 1 O
-X OP0 29 550 500 200 L 50 50 1 1 O
-X RS2 3 -550 800 200 R 50 50 1 1 I
-X TXDA 30 550 -400 200 L 50 50 1 1 P
-X RXDA 31 550 -500 200 L 50 50 1 1 P
-X X1/CLK 32 -550 -1150 200 R 50 50 1 1 I
-X X2 33 -550 -1350 200 R 50 50 1 1 O
-X ~RST 34 -550 1200 200 R 50 50 1 1 I
-X ~CS 35 -550 -600 200 R 50 50 1 1 I
-X IP2 36 550 1000 200 L 50 50 1 1 I
-X ~IACK 37 -550 -800 200 R 50 50 1 1 I
-X IP5 38 550 700 200 L 50 50 1 1 I
-X IP4 39 550 800 200 L 50 50 1 1 I
-X IP1 4 550 1100 200 L 50 50 1 1 I
-X VCC 40 0 1500 200 D 50 50 1 1 W
-X RS3 5 -550 700 200 R 50 50 1 1 I
-X RD4 6 -550 600 200 R 50 50 1 1 I
-X IP0 7 550 1200 200 L 50 50 1 1 I
-X R/~W 8 -550 -500 200 R 50 50 1 1 I
-X ~DTACK 9 550 -1350 200 L 50 50 1 1 C
-ENDDRAW
-ENDDEF
-#
-# sram_um61512ak
-#
-DEF sram_um61512ak U 0 40 Y Y 1 F N
-F0 "U" 100 -1200 60 H V C CNN
-F1 "sram_um61512ak" 0 -50 60 V V C CNN
-F2 "" -100 -800 60 H V C CNN
-F3 "" -100 -800 60 H V C CNN
-DRAW
-S -350 1050 350 -1100 0 1 0 f
-X A2 10 -550 800 200 R 50 50 1 1 I
-X A1 11 -550 900 200 R 50 50 1 1 I
-X A0 12 -550 1000 200 R 50 50 1 1 I
-X D0 13 550 1000 200 L 50 50 1 1 B
-X D1 14 550 900 200 L 50 50 1 1 B
-X D2 15 550 800 200 L 50 50 1 1 B
-X GND 16 0 -1300 200 U 50 50 1 1 W
-X D3 17 550 700 200 L 50 50 1 1 B
-X D4 18 550 600 200 L 50 50 1 1 B
-X D5 19 550 500 200 L 50 50 1 1 B
-X D6 20 550 400 200 L 50 50 1 1 B
-X D7 21 550 300 200 L 50 50 1 1 B
-X ~CE1 22 -550 -950 200 R 50 50 1 1 I I
-X A10 23 -550 0 200 R 50 50 1 1 I
-X ~OE 24 -550 -750 200 R 50 50 1 1 I I
-X A11 25 -550 -100 200 R 50 50 1 1 I
-X A9 26 -550 100 200 R 50 50 1 1 I
-X A8 27 -550 200 200 R 50 50 1 1 I
-X A13 28 -550 -300 200 R 50 50 1 1 I
-X ~WE 29 -550 -850 200 R 50 50 1 1 I I
-X A14 3 -550 -400 200 R 50 50 1 1 I
-X CE2 30 -550 -1050 200 R 50 50 1 1 I
-X A15 31 -550 -500 200 R 50 50 1 1 I
-X VCC 32 0 1250 200 D 50 50 1 1 W
-X A12 4 -550 -200 200 R 50 50 1 1 I
-X A7 5 -550 300 200 R 50 50 1 1 I
-X A6 6 -550 400 200 R 50 50 1 1 I
-X A5 7 -550 500 200 R 50 50 1 1 I
-X A4 8 -550 600 200 R 50 50 1 1 I
-X A3 9 -550 700 200 R 50 50 1 1 I
-ENDDRAW
-ENDDEF
-#
-# z80glue
-#
-DEF z80glue U 0 40 Y Y 1 F N
-F0 "U" 100 650 50 H V C CNN
-F1 "z80glue" -200 650 50 H V C CNN
-F2 "" -350 -400 50 H I C CNN
-F3 "" -350 -400 50 H I C CNN
-DRAW
-S -350 600 350 -600 0 1 0 f
-X A4 1 -550 550 200 R 50 50 1 1 I
-X GND 10 0 -800 200 U 50 50 1 1 W
-X ~RFSH 11 -550 -350 200 R 50 50 1 1 I
-X ~RD 12 -550 -450 200 R 50 50 1 1 I
-X ~WR 13 -550 -550 200 R 50 50 1 1 I
-X NC 14 200 -250 200 L 50 50 1 1 N N
-X ~IACK 15 550 -150 200 L 50 50 1 1 O
-X UARTEN 16 550 350 200 L 50 50 1 1 O
-X ~UARTEN 17 550 250 200 L 50 50 1 1 O
-X ~RAMEN 18 550 150 200 L 50 50 1 1 O
-X ~ROMEN 19 550 50 200 L 50 50 1 1 O
-X A5 2 -550 450 200 R 50 50 1 1 I
-X A6 3 -550 350 200 R 50 50 1 1 I
-X A7 4 -550 250 200 R 50 50 1 1 I
-X A15 5 -550 150 200 R 50 50 1 1 I
-X NC 6 200 -350 200 L 50 50 1 1 N N
-X ~M1 7 -550 -50 200 R 50 50 1 1 I
-X ~MREQ 8 -550 -150 200 R 50 50 1 1 I
-X ~IOREQ 9 -550 -250 200 R 50 50 1 1 I
-X VCC ~ 0 800 200 D 50 50 1 1 W
-ENDDRAW
-ENDDEF
-#
-#End Library
diff --git a/z80comp2.pro b/z80comp2.pro
deleted file mode 100644 (file)
index 152769c..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-update=22/05/2015 07:44:53
-version=1
-last_client=kicad
-[general]
-version=1
-RootSch=
-BoardNm=
-[pcbnew]
-version=1
-LastNetListRead=
-UseCmpFile=1
-PadDrill=0.600000000000
-PadDrillOvalY=0.600000000000
-PadSizeH=1.500000000000
-PadSizeV=1.500000000000
-PcbTextSizeV=1.500000000000
-PcbTextSizeH=1.500000000000
-PcbTextThickness=0.300000000000
-ModuleTextSizeV=1.000000000000
-ModuleTextSizeH=1.000000000000
-ModuleTextSizeThickness=0.150000000000
-SolderMaskClearance=0.000000000000
-SolderMaskMinWidth=0.000000000000
-DrawSegmentWidth=0.200000000000
-BoardOutlineThickness=0.100000000000
-ModuleOutlineThickness=0.150000000000
-[cvpcb]
-version=1
-NetIExt=net
-[eeschema]
-version=1
-LibDir=
-[eeschema/libraries]
diff --git a/z80comp2.sch b/z80comp2.sch
deleted file mode 100644 (file)
index 9c74d01..0000000
+++ /dev/null
@@ -1,1741 +0,0 @@
-EESchema Schematic File Version 4
-EELAYER 30 0
-EELAYER END
-$Descr A4 11693 8268
-encoding utf-8
-Sheet 1 1
-Title "Z80 computer 2"
-Date "2020-04-29"
-Rev ""
-Comp ""
-Comment1 "License: Creative Commons Attribution Share-Alike (CC BY-SA)"
-Comment2 "Copyright (C) 2020 John Tsiombikas <nuclear@member.fsf.org>"
-Comment3 ""
-Comment4 ""
-$EndDescr
-$Comp
-L CPU:Z80CPU U3
-U 1 1 5EA29512
-P 2000 4050
-F 0 "U3" H 2200 2650 50  0000 C CNN
-F 1 "Z80CPU" H 2000 4050 50  0000 C CNN
-F 2 "" H 2000 4450 50  0001 C CNN
-F 3 "www.zilog.com/manage_directlink.php?filepath=docs/z80/um0080" H 2000 4450 50  0001 C CNN
-       1    2000 4050
-       1    0    0    -1  
-$EndComp
-$Comp
-L Memory_EEPROM:28C256 U6
-U 1 1 5EA2C09A
-P 3850 4400
-F 0 "U6" H 4000 3350 50  0000 C CNN
-F 1 "28C256" V 3850 4400 50  0000 C CNN
-F 2 "" H 3850 4400 50  0001 C CNN
-F 3 "http://ww1.microchip.com/downloads/en/DeviceDoc/doc0006.pdf" H 3850 4400 50  0001 C CNN
-       1    3850 4400
-       1    0    0    -1  
-$EndComp
-$Comp
-L power:GND #PWR08
-U 1 1 5EA2ECD7
-P 2000 5550
-F 0 "#PWR08" H 2000 5300 50  0001 C CNN
-F 1 "GND" H 2005 5377 50  0000 C CNN
-F 2 "" H 2000 5550 50  0001 C CNN
-F 3 "" H 2000 5550 50  0001 C CNN
-       1    2000 5550
-       1    0    0    -1  
-$EndComp
-$Comp
-L power:GND #PWR016
-U 1 1 5EA2F4C0
-P 3850 5500
-F 0 "#PWR016" H 3850 5250 50  0001 C CNN
-F 1 "GND" H 3855 5327 50  0000 C CNN
-F 2 "" H 3850 5500 50  0001 C CNN
-F 3 "" H 3850 5500 50  0001 C CNN
-       1    3850 5500
-       1    0    0    -1  
-$EndComp
-$Comp
-L power:VCC #PWR07
-U 1 1 5EA2FD95
-P 2000 2550
-F 0 "#PWR07" H 2000 2400 50  0001 C CNN
-F 1 "VCC" H 2017 2723 50  0000 C CNN
-F 2 "" H 2000 2550 50  0001 C CNN
-F 3 "" H 2000 2550 50  0001 C CNN
-       1    2000 2550
-       1    0    0    -1  
-$EndComp
-$Comp
-L power:VCC #PWR015
-U 1 1 5EA30021
-P 3850 3300
-F 0 "#PWR015" H 3850 3150 50  0001 C CNN
-F 1 "VCC" H 3867 3473 50  0000 C CNN
-F 2 "" H 3850 3300 50  0001 C CNN
-F 3 "" H 3850 3300 50  0001 C CNN
-       1    3850 3300
-       1    0    0    -1  
-$EndComp
-Wire Wire Line
-       2700 4550 2900 4550
-Wire Wire Line
-       2700 4650 2900 4650
-Wire Wire Line
-       2700 4750 2900 4750
-Wire Wire Line
-       2700 4850 2900 4850
-Wire Wire Line
-       2700 4950 2900 4950
-Wire Wire Line
-       2700 5050 2900 5050
-Wire Wire Line
-       2700 5150 2900 5150
-Wire Wire Line
-       2700 5250 2900 5250
-Text Label 2750 4550 0    50   ~ 0
-D0
-Text Label 2750 4650 0    50   ~ 0
-D1
-Text Label 2750 4750 0    50   ~ 0
-D2
-Text Label 2750 4850 0    50   ~ 0
-D3
-Text Label 2750 4950 0    50   ~ 0
-D4
-Text Label 2750 5050 0    50   ~ 0
-D5
-Text Label 2750 5150 0    50   ~ 0
-D6
-Text Label 2750 5250 0    50   ~ 0
-D7
-Entry Wire Line
-       2900 4550 3000 4650
-Entry Wire Line
-       2900 4650 3000 4750
-Entry Wire Line
-       2900 4750 3000 4850
-Entry Wire Line
-       2900 4850 3000 4950
-Entry Wire Line
-       2900 4950 3000 5050
-Entry Wire Line
-       2900 5050 3000 5150
-Entry Wire Line
-       2900 5150 3000 5250
-Entry Wire Line
-       2900 5250 3000 5350
-Wire Wire Line
-       4250 3500 4450 3500
-Wire Wire Line
-       4250 3600 4450 3600
-Wire Wire Line
-       4250 3700 4450 3700
-Wire Wire Line
-       4250 3800 4450 3800
-Wire Wire Line
-       4250 3900 4450 3900
-Wire Wire Line
-       4250 4000 4450 4000
-Wire Wire Line
-       4250 4100 4450 4100
-Wire Wire Line
-       4250 4200 4450 4200
-Text Label 4300 3500 0    50   ~ 0
-D0
-Text Label 4300 3600 0    50   ~ 0
-D1
-Text Label 4300 3700 0    50   ~ 0
-D2
-Text Label 4300 3800 0    50   ~ 0
-D3
-Text Label 4300 3900 0    50   ~ 0
-D4
-Text Label 4300 4000 0    50   ~ 0
-D5
-Text Label 4300 4100 0    50   ~ 0
-D6
-Text Label 4300 4200 0    50   ~ 0
-D7
-Entry Wire Line
-       4450 3500 4550 3600
-Entry Wire Line
-       4450 3600 4550 3700
-Entry Wire Line
-       4450 3700 4550 3800
-Entry Wire Line
-       4450 3800 4550 3900
-Entry Wire Line
-       4450 3900 4550 4000
-Entry Wire Line
-       4450 4000 4550 4100
-Entry Wire Line
-       4450 4100 4550 4200
-Entry Wire Line
-       4450 4200 4550 4300
-Wire Wire Line
-       2700 2850 2900 2850
-Wire Wire Line
-       2700 2950 2900 2950
-Wire Wire Line
-       2700 3050 2900 3050
-Wire Wire Line
-       2700 3150 2900 3150
-Wire Wire Line
-       2700 3250 2900 3250
-Wire Wire Line
-       2700 3350 2900 3350
-Wire Wire Line
-       2700 3450 2900 3450
-Wire Wire Line
-       2700 3550 2900 3550
-Wire Wire Line
-       2700 3650 2900 3650
-Wire Wire Line
-       2700 3750 2900 3750
-Wire Wire Line
-       2700 3850 2900 3850
-Wire Wire Line
-       2700 3950 2900 3950
-Wire Wire Line
-       2700 4050 2900 4050
-Wire Wire Line
-       2700 4150 2900 4150
-Wire Wire Line
-       2700 4250 2900 4250
-Wire Wire Line
-       2700 4350 2900 4350
-Text Label 2750 2850 0    50   ~ 0
-A0
-Text Label 2750 2950 0    50   ~ 0
-A1
-Text Label 2750 3050 0    50   ~ 0
-A2
-Text Label 2750 3150 0    50   ~ 0
-A3
-Text Label 2750 3250 0    50   ~ 0
-A4
-Text Label 2750 3350 0    50   ~ 0
-A5
-Text Label 2750 3450 0    50   ~ 0
-A6
-Text Label 2750 3550 0    50   ~ 0
-A7
-Text Label 2750 3650 0    50   ~ 0
-A8
-Text Label 2750 3750 0    50   ~ 0
-A9
-Text Label 2750 3850 0    50   ~ 0
-A10
-Text Label 2750 3950 0    50   ~ 0
-A11
-Text Label 2750 4050 0    50   ~ 0
-A12
-Text Label 2750 4150 0    50   ~ 0
-A13
-Text Label 2750 4250 0    50   ~ 0
-A14
-Text Label 2750 4350 0    50   ~ 0
-A15
-Entry Wire Line
-       2900 4350 3000 4250
-Entry Wire Line
-       2900 4250 3000 4150
-Entry Wire Line
-       2900 4150 3000 4050
-Entry Wire Line
-       2900 4050 3000 3950
-Entry Wire Line
-       2900 3950 3000 3850
-Entry Wire Line
-       2900 3850 3000 3750
-Entry Wire Line
-       2900 3750 3000 3650
-Entry Wire Line
-       2900 3650 3000 3550
-Entry Wire Line
-       2900 3550 3000 3450
-Entry Wire Line
-       2900 3450 3000 3350
-Entry Wire Line
-       2900 3350 3000 3250
-Entry Wire Line
-       2900 3250 3000 3150
-Entry Wire Line
-       2900 3150 3000 3050
-Entry Wire Line
-       2900 3050 3000 2950
-Entry Wire Line
-       2900 2950 3000 2850
-Entry Wire Line
-       2900 2850 3000 2750
-Text Label 3450 5850 0    50   ~ 0
-D[0..7]
-Wire Wire Line
-       3450 3500 3250 3500
-Wire Wire Line
-       3450 3600 3250 3600
-Wire Wire Line
-       3450 3700 3250 3700
-Wire Wire Line
-       3450 3800 3250 3800
-Wire Wire Line
-       3450 3900 3250 3900
-Wire Wire Line
-       3450 4000 3250 4000
-Wire Wire Line
-       3450 4100 3250 4100
-Wire Wire Line
-       3450 4200 3250 4200
-Wire Wire Line
-       3450 4300 3250 4300
-Wire Wire Line
-       3450 4400 3250 4400
-Wire Wire Line
-       3450 4500 3250 4500
-Wire Wire Line
-       3450 4600 3250 4600
-Wire Wire Line
-       3450 4700 3250 4700
-Wire Wire Line
-       3450 4800 3250 4800
-Wire Wire Line
-       3450 4900 3250 4900
-Text Label 3300 3500 0    50   ~ 0
-A0
-Text Label 3300 3600 0    50   ~ 0
-A1
-Text Label 3300 3700 0    50   ~ 0
-A2
-Text Label 3300 3800 0    50   ~ 0
-A3
-Text Label 3300 3900 0    50   ~ 0
-A4
-Text Label 3300 4000 0    50   ~ 0
-A5
-Text Label 3300 4100 0    50   ~ 0
-A6
-Text Label 3300 4200 0    50   ~ 0
-A7
-Text Label 3300 4300 0    50   ~ 0
-A8
-Text Label 3300 4400 0    50   ~ 0
-A9
-Text Label 3300 4500 0    50   ~ 0
-A10
-Text Label 3300 4600 0    50   ~ 0
-A11
-Text Label 3300 4700 0    50   ~ 0
-A12
-Text Label 3300 4800 0    50   ~ 0
-A13
-Text Label 3300 4900 0    50   ~ 0
-A14
-Entry Wire Line
-       3150 3400 3250 3500
-Entry Wire Line
-       3150 3500 3250 3600
-Entry Wire Line
-       3150 3600 3250 3700
-Entry Wire Line
-       3150 3700 3250 3800
-Entry Wire Line
-       3150 3800 3250 3900
-Entry Wire Line
-       3150 3900 3250 4000
-Entry Wire Line
-       3150 4000 3250 4100
-Entry Wire Line
-       3150 4100 3250 4200
-Entry Wire Line
-       3150 4200 3250 4300
-Entry Wire Line
-       3150 4300 3250 4400
-Entry Wire Line
-       3150 4400 3250 4500
-Entry Wire Line
-       3150 4500 3250 4600
-Entry Wire Line
-       3150 4600 3250 4700
-Entry Wire Line
-       3150 4700 3250 4800
-Entry Wire Line
-       3150 4800 3250 4900
-Text Label 4250 2600 0    50   ~ 0
-A[0..15]
-$Comp
-L power:VCC #PWR012
-U 1 1 5EA9AA1C
-P 3350 5100
-F 0 "#PWR012" H 3350 4950 50  0001 C CNN
-F 1 "VCC" H 3450 5200 50  0000 C CNN
-F 2 "" H 3350 5100 50  0001 C CNN
-F 3 "" H 3350 5100 50  0001 C CNN
-       1    3350 5100
-       1    0    0    -1  
-$EndComp
-Wire Wire Line
-       3450 5100 3350 5100
-Wire Bus Line
-       3000 2600 3150 2600
-Connection ~ 3150 2600
-Wire Wire Line
-       3450 5300 3150 5300
-Text Label 3150 5300 0    50   ~ 0
-~ROMEN
-Wire Wire Line
-       3450 5200 3300 5200
-Text Label 3300 5200 0    50   ~ 0
-~RD
-Wire Wire Line
-       1300 4550 1000 4550
-Wire Wire Line
-       1300 4650 1000 4650
-Wire Wire Line
-       1300 4750 1000 4750
-Wire Wire Line
-       1300 4850 1000 4850
-Text Label 1150 4550 0    50   ~ 0
-~RD
-Text Label 1150 4650 0    50   ~ 0
-~WR
-Text Label 1050 4750 0    50   ~ 0
-~MREQ
-Text Label 1050 4850 0    50   ~ 0
-~IOREQ
-Text Label 1150 2850 0    50   ~ 0
-~RST
-$Comp
-L z80comp2:mc68681 U8
-U 1 1 5EAC419A
-P 7350 3900
-F 0 "U8" H 7500 2350 50  0000 C CNN
-F 1 "mc68681" V 7350 3900 50  0000 C CNN
-F 2 "" H 7900 3350 50  0001 C CNN
-F 3 "" H 7900 3350 50  0001 C CNN
-       1    7350 3900
-       1    0    0    -1  
-$EndComp
-$Comp
-L z80comp2:sram_um61512ak U7
-U 1 1 5EAC72ED
-P 5550 4300
-F 0 "U7" H 5700 3150 60  0000 C CNN
-F 1 "sram_um61512ak" V 5550 4300 60  0000 C CNN
-F 2 "" H 5450 3500 60  0000 C CNN
-F 3 "" H 5450 3500 60  0000 C CNN
-       1    5550 4300
-       1    0    0    -1  
-$EndComp
-Wire Wire Line
-       6100 3300 6300 3300
-Wire Wire Line
-       6100 3400 6300 3400
-Wire Wire Line
-       6100 3500 6300 3500
-Wire Wire Line
-       6100 3600 6300 3600
-Wire Wire Line
-       6100 3700 6300 3700
-Wire Wire Line
-       6100 3800 6300 3800
-Wire Wire Line
-       6100 3900 6300 3900
-Wire Wire Line
-       6100 4000 6300 4000
-Text Label 6150 3300 0    50   ~ 0
-D0
-Text Label 6150 3400 0    50   ~ 0
-D1
-Text Label 6150 3500 0    50   ~ 0
-D2
-Text Label 6150 3600 0    50   ~ 0
-D3
-Text Label 6150 3700 0    50   ~ 0
-D4
-Text Label 6150 3800 0    50   ~ 0
-D5
-Text Label 6150 3900 0    50   ~ 0
-D6
-Text Label 6150 4000 0    50   ~ 0
-D7
-Entry Wire Line
-       6300 3300 6400 3400
-Entry Wire Line
-       6300 3400 6400 3500
-Entry Wire Line
-       6300 3500 6400 3600
-Entry Wire Line
-       6300 3600 6400 3700
-Entry Wire Line
-       6300 3700 6400 3800
-Entry Wire Line
-       6300 3800 6400 3900
-Entry Wire Line
-       6300 3900 6400 4000
-Entry Wire Line
-       6300 4000 6400 4100
-Wire Wire Line
-       6500 3500 6800 3500
-Wire Wire Line
-       6500 3600 6800 3600
-Wire Wire Line
-       6500 3700 6800 3700
-Wire Wire Line
-       6500 3800 6800 3800
-Wire Wire Line
-       6500 3900 6800 3900
-Wire Wire Line
-       6500 4000 6800 4000
-Wire Wire Line
-       6500 4100 6800 4100
-Wire Wire Line
-       6500 4200 6800 4200
-Text Label 6650 3500 0    50   ~ 0
-D0
-Text Label 6650 3600 0    50   ~ 0
-D1
-Text Label 6650 3700 0    50   ~ 0
-D2
-Text Label 6650 3800 0    50   ~ 0
-D3
-Text Label 6650 3900 0    50   ~ 0
-D4
-Text Label 6650 4000 0    50   ~ 0
-D5
-Text Label 6650 4100 0    50   ~ 0
-D6
-Text Label 6650 4200 0    50   ~ 0
-D7
-Wire Wire Line
-       5000 4800 4650 4800
-Text Label 4650 4800 0    50   ~ 0
-BANKSEL
-Wire Wire Line
-       5000 3300 4800 3300
-Wire Wire Line
-       5000 3400 4800 3400
-Wire Wire Line
-       5000 3500 4800 3500
-Wire Wire Line
-       5000 3600 4800 3600
-Wire Wire Line
-       5000 3700 4800 3700
-Wire Wire Line
-       5000 3800 4800 3800
-Wire Wire Line
-       5000 3900 4800 3900
-Wire Wire Line
-       5000 4000 4800 4000
-Wire Wire Line
-       5000 4100 4800 4100
-Wire Wire Line
-       5000 4200 4800 4200
-Wire Wire Line
-       5000 4300 4800 4300
-Wire Wire Line
-       5000 4400 4800 4400
-Wire Wire Line
-       5000 4500 4800 4500
-Wire Wire Line
-       5000 4600 4800 4600
-Wire Wire Line
-       5000 4700 4800 4700
-Text Label 4850 3300 0    50   ~ 0
-A0
-Text Label 4850 3400 0    50   ~ 0
-A1
-Text Label 4850 3500 0    50   ~ 0
-A2
-Text Label 4850 3600 0    50   ~ 0
-A3
-Text Label 4850 3700 0    50   ~ 0
-A4
-Text Label 4850 3800 0    50   ~ 0
-A5
-Text Label 4850 3900 0    50   ~ 0
-A6
-Text Label 4850 4000 0    50   ~ 0
-A7
-Text Label 4850 4100 0    50   ~ 0
-A8
-Text Label 4850 4200 0    50   ~ 0
-A9
-Text Label 4850 4300 0    50   ~ 0
-A10
-Text Label 4850 4400 0    50   ~ 0
-A11
-Text Label 4850 4500 0    50   ~ 0
-A12
-Text Label 4850 4600 0    50   ~ 0
-A13
-Text Label 4850 4700 0    50   ~ 0
-A14
-Entry Wire Line
-       4700 3200 4800 3300
-Entry Wire Line
-       4700 3300 4800 3400
-Entry Wire Line
-       4700 3400 4800 3500
-Entry Wire Line
-       4700 3500 4800 3600
-Entry Wire Line
-       4700 3600 4800 3700
-Entry Wire Line
-       4700 3700 4800 3800
-Entry Wire Line
-       4700 3800 4800 3900
-Entry Wire Line
-       4700 3900 4800 4000
-Entry Wire Line
-       4700 4000 4800 4100
-Entry Wire Line
-       4700 4100 4800 4200
-Entry Wire Line
-       4700 4200 4800 4300
-Entry Wire Line
-       4700 4300 4800 4400
-Entry Wire Line
-       4700 4400 4800 4500
-Entry Wire Line
-       4700 4500 4800 4600
-Entry Wire Line
-       4700 4600 4800 4700
-Wire Wire Line
-       5000 5050 4900 5050
-Text Label 4900 5050 0    50   ~ 0
-~RD
-Wire Wire Line
-       5000 5150 4900 5150
-Text Label 4900 5150 0    50   ~ 0
-~WR
-Wire Wire Line
-       5000 5250 4750 5250
-Text Label 4750 5250 0    50   ~ 0
-~RAMEN
-$Comp
-L power:VCC #PWR019
-U 1 1 5EB3084D
-P 5550 3050
-F 0 "#PWR019" H 5550 2900 50  0001 C CNN
-F 1 "VCC" H 5567 3223 50  0000 C CNN
-F 2 "" H 5550 3050 50  0001 C CNN
-F 3 "" H 5550 3050 50  0001 C CNN
-       1    5550 3050
-       1    0    0    -1  
-$EndComp
-$Comp
-L power:VCC #PWR017
-U 1 1 5EB32548
-P 4650 5300
-F 0 "#PWR017" H 4650 5150 50  0001 C CNN
-F 1 "VCC" H 4667 5473 50  0000 C CNN
-F 2 "" H 4650 5300 50  0001 C CNN
-F 3 "" H 4650 5300 50  0001 C CNN
-       1    4650 5300
-       1    0    0    -1  
-$EndComp
-Wire Wire Line
-       4650 5300 4650 5350
-Wire Wire Line
-       4650 5350 5000 5350
-$Comp
-L power:GND #PWR020
-U 1 1 5EB37534
-P 5550 5600
-F 0 "#PWR020" H 5550 5350 50  0001 C CNN
-F 1 "GND" H 5555 5427 50  0000 C CNN
-F 2 "" H 5550 5600 50  0001 C CNN
-F 3 "" H 5550 5600 50  0001 C CNN
-       1    5550 5600
-       1    0    0    -1  
-$EndComp
-$Comp
-L power:GND #PWR021
-U 1 1 5EB3BBF0
-P 7350 5600
-F 0 "#PWR021" H 7350 5350 50  0001 C CNN
-F 1 "GND" H 7355 5427 50  0000 C CNN
-F 2 "" H 7350 5600 50  0001 C CNN
-F 3 "" H 7350 5600 50  0001 C CNN
-       1    7350 5600
-       1    0    0    -1  
-$EndComp
-$Comp
-L power:VCC #PWR022
-U 1 1 5EB3BF7A
-P 7350 2400
-F 0 "#PWR022" H 7350 2250 50  0001 C CNN
-F 1 "VCC" H 7367 2573 50  0000 C CNN
-F 2 "" H 7350 2400 50  0001 C CNN
-F 3 "" H 7350 2400 50  0001 C CNN
-       1    7350 2400
-       1    0    0    -1  
-$EndComp
-Wire Wire Line
-       6800 3000 6450 3000
-Wire Wire Line
-       6800 3100 6450 3100
-Wire Wire Line
-       6800 3200 6450 3200
-Wire Wire Line
-       6800 3300 6450 3300
-Text Label 6650 3000 0    50   ~ 0
-A0
-Text Label 6650 3100 0    50   ~ 0
-A1
-Text Label 6650 3200 0    50   ~ 0
-A2
-Text Label 6650 3300 0    50   ~ 0
-A3
-Wire Wire Line
-       6800 4500 6500 4500
-Text Label 6500 4500 0    50   ~ 0
-~UARTEN
-NoConn ~ 11900 2450
-$Comp
-L z80comp2:z80glue U5
-U 1 1 5EB69DED
-P 3850 1550
-F 0 "U5" H 4000 2100 50  0000 C CNN
-F 1 "z80glue" H 3600 900 50  0000 C CNN
-F 2 "" H 3800 1650 50  0001 C CNN
-F 3 "" H 3800 1650 50  0001 C CNN
-       1    3850 1550
-       1    0    0    -1  
-$EndComp
-$Comp
-L power:VCC #PWR013
-U 1 1 5EB7EC44
-P 3850 750
-F 0 "#PWR013" H 3850 600 50  0001 C CNN
-F 1 "VCC" H 3867 923 50  0000 C CNN
-F 2 "" H 3850 750 50  0001 C CNN
-F 3 "" H 3850 750 50  0001 C CNN
-       1    3850 750 
-       1    0    0    -1  
-$EndComp
-$Comp
-L power:GND #PWR014
-U 1 1 5EB872CE
-P 3850 2350
-F 0 "#PWR014" H 3850 2100 50  0001 C CNN
-F 1 "GND" H 3855 2177 50  0000 C CNN
-F 2 "" H 3850 2350 50  0001 C CNN
-F 3 "" H 3850 2350 50  0001 C CNN
-       1    3850 2350
-       1    0    0    -1  
-$EndComp
-Wire Wire Line
-       3300 1000 3100 1000
-Wire Wire Line
-       3300 1100 3100 1100
-Wire Wire Line
-       3300 1200 3100 1200
-Wire Wire Line
-       3300 1300 3100 1300
-Wire Wire Line
-       3300 1400 3100 1400
-Wire Wire Line
-       3300 1700 3100 1700
-Wire Wire Line
-       3300 1800 3100 1800
-Text Label 3150 1000 0    50   ~ 0
-A4
-Text Label 3150 1100 0    50   ~ 0
-A5
-Text Label 3150 1200 0    50   ~ 0
-A6
-Text Label 3150 1300 0    50   ~ 0
-A7
-Text Label 3150 1400 0    50   ~ 0
-A15
-Text Label 3100 1700 0    50   ~ 0
-~MREQ
-Text Label 3100 1800 0    50   ~ 0
-~IOREQ
-Entry Wire Line
-       3000 1500 3100 1400
-Entry Wire Line
-       3000 1400 3100 1300
-Entry Wire Line
-       3000 1300 3100 1200
-Entry Wire Line
-       3000 1200 3100 1100
-Entry Wire Line
-       3000 1100 3100 1000
-Wire Wire Line
-       4400 1500 4700 1500
-Wire Wire Line
-       4400 1300 4700 1300
-Wire Wire Line
-       4400 1400 4700 1400
-Text Label 6500 1300 0    50   ~ 0
-~UARTEN
-Text Label 4400 1400 0    50   ~ 0
-~RAMEN
-Text Label 4400 1500 0    50   ~ 0
-~ROMEN
-Wire Wire Line
-       6800 4400 6650 4400
-Text Label 6650 4400 0    50   ~ 0
-~WR
-Entry Wire Line
-       6350 2900 6450 3000
-Entry Wire Line
-       6350 3000 6450 3100
-Entry Wire Line
-       6350 3100 6450 3200
-Entry Wire Line
-       6350 3200 6450 3300
-Entry Wire Line
-       6400 4300 6500 4200
-Entry Wire Line
-       6400 4200 6500 4100
-Entry Wire Line
-       6400 4100 6500 4000
-Entry Wire Line
-       6400 4000 6500 3900
-Entry Wire Line
-       6400 3900 6500 3800
-Entry Wire Line
-       6400 3800 6500 3700
-Entry Wire Line
-       6400 3700 6500 3600
-Entry Wire Line
-       6400 3600 6500 3500
-Wire Wire Line
-       6800 2700 6650 2700
-Text Label 6650 2700 0    50   ~ 0
-~RST
-Wire Bus Line
-       6400 4400 6100 4400
-Wire Bus Line
-       6100 4400 6100 5850
-Wire Bus Line
-       6100 5850 4550 5850
-Connection ~ 4550 5850
-$Comp
-L Device:Crystal_Small Y1
-U 1 1 5ED63565
-P 6550 5150
-F 0 "Y1" V 6600 5100 50  0000 R CNN
-F 1 "3.6864MHz" V 6700 5450 50  0000 R CNN
-F 2 "" H 6550 5150 50  0001 C CNN
-F 3 "~" H 6550 5150 50  0001 C CNN
-       1    6550 5150
-       0    -1   -1   0   
-$EndComp
-Wire Wire Line
-       6550 5050 6800 5050
-$Comp
-L Device:C_Small C11
-U 1 1 5ED7A206
-P 6550 5400
-F 0 "C11" H 6750 5400 50  0000 R CNN
-F 1 "5pF" H 6750 5500 50  0000 R CNN
-F 2 "" H 6550 5400 50  0001 C CNN
-F 3 "~" H 6550 5400 50  0001 C CNN
-       1    6550 5400
-       1    0    0    1   
-$EndComp
-$Comp
-L Device:C_Small C10
-U 1 1 5ED7B05B
-P 6350 5200
-F 0 "C10" H 6550 5200 50  0000 R CNN
-F 1 "15pF" H 6550 5300 50  0000 R CNN
-F 2 "" H 6350 5200 50  0001 C CNN
-F 3 "~" H 6350 5200 50  0001 C CNN
-       1    6350 5200
-       -1   0    0    1   
-$EndComp
-Wire Wire Line
-       6350 5100 6350 5050
-Wire Wire Line
-       6350 5050 6550 5050
-Wire Wire Line
-       6550 5300 6550 5250
-Connection ~ 6550 5250
-Wire Wire Line
-       7350 5600 6550 5600
-Wire Wire Line
-       6550 5600 6550 5500
-Wire Wire Line
-       6550 5600 6350 5600
-Wire Wire Line
-       6350 5600 6350 5300
-$Comp
-L Interface_UART:MAX232 U9
-U 1 1 5EDB13AC
-P 9300 3900
-F 0 "U9" H 9500 2850 50  0000 C CNN
-F 1 "MAX232" H 9300 4150 50  0000 C CNN
-F 2 "" H 9350 2850 50  0001 L CNN
-F 3 "http://www.ti.com/lit/ds/symlink/max232.pdf" H 9300 4000 50  0001 C CNN
-       1    9300 3900
-       1    0    0    -1  
-$EndComp
-Wire Bus Line
-       4550 5850 4400 5850
-Wire Wire Line
-       7900 3500 8200 3500
-Text Label 7900 3500 0    50   ~ 0
-BANKSEL
-Text Label 7900 3400 0    50   ~ 0
-~RTSA
-Text Label 7900 2700 0    50   ~ 0
-~CTSA
-Text Label 7900 4300 0    50   ~ 0
-TXA
-Text Label 7900 4400 0    50   ~ 0
-RXA
-Wire Wire Line
-       8350 3400 8350 4200
-Wire Wire Line
-       8350 4200 8500 4200
-Wire Wire Line
-       7900 3400 8350 3400
-Wire Wire Line
-       8300 2700 8300 4600
-Wire Wire Line
-       8300 4600 8500 4600
-Wire Wire Line
-       7900 2700 8300 2700
-$Comp
-L power:GND #PWR026
-U 1 1 5EE75D69
-P 9300 5100
-F 0 "#PWR026" H 9300 4850 50  0001 C CNN
-F 1 "GND" H 9305 4927 50  0000 C CNN
-F 2 "" H 9300 5100 50  0001 C CNN
-F 3 "" H 9300 5100 50  0001 C CNN
-       1    9300 5100
-       1    0    0    -1  
-$EndComp
-$Comp
-L power:VCC #PWR025
-U 1 1 5EE7620F
-P 9300 2700
-F 0 "#PWR025" H 9300 2550 50  0001 C CNN
-F 1 "VCC" H 9317 2873 50  0000 C CNN
-F 2 "" H 9300 2700 50  0001 C CNN
-F 3 "" H 9300 2700 50  0001 C CNN
-       1    9300 2700
-       1    0    0    -1  
-$EndComp
-$Comp
-L Device:C C12
-U 1 1 5EE7734D
-P 8500 3150
-F 0 "C12" H 8500 3250 50  0000 L CNN
-F 1 "0.1uF" H 8400 2950 50  0000 L CNN
-F 2 "" H 8538 3000 50  0001 C CNN
-F 3 "~" H 8500 3150 50  0001 C CNN
-       1    8500 3150
-       1    0    0    -1  
-$EndComp
-$Comp
-L Device:C C13
-U 1 1 5EEBDB7E
-P 10100 3150
-F 0 "C13" H 9950 3250 50  0000 L CNN
-F 1 "0.1uF" H 9850 3050 50  0000 L CNN
-F 2 "" H 10138 3000 50  0001 C CNN
-F 3 "~" H 10100 3150 50  0001 C CNN
-       1    10100 3150
-       -1   0    0    -1  
-$EndComp
-$Comp
-L Device:C C14
-U 1 1 5EEBE0D7
-P 10300 3500
-F 0 "C14" V 10250 3600 50  0000 L CNN
-F 1 "0.1uF" V 10250 3200 50  0000 L CNN
-F 2 "" H 10338 3350 50  0001 C CNN
-F 3 "~" H 10300 3500 50  0001 C CNN
-       1    10300 3500
-       0    -1   1    0   
-$EndComp
-Wire Wire Line
-       10150 3500 10100 3500
-Wire Wire Line
-       10100 3800 10150 3800
-$Comp
-L Device:C C15
-U 1 1 5EEC6839
-P 10300 3800
-F 0 "C15" V 10250 3900 50  0000 L CNN
-F 1 "0.1uF" V 10250 3500 50  0000 L CNN
-F 2 "" H 10338 3650 50  0001 C CNN
-F 3 "~" H 10300 3800 50  0001 C CNN
-       1    10300 3800
-       0    -1   1    0   
-$EndComp
-$Comp
-L power:VCC #PWR029
-U 1 1 5EEEF5D1
-P 10650 3400
-F 0 "#PWR029" H 10650 3250 50  0001 C CNN
-F 1 "VCC" H 10667 3573 50  0000 C CNN
-F 2 "" H 10650 3400 50  0001 C CNN
-F 3 "" H 10650 3400 50  0001 C CNN
-       1    10650 3400
-       1    0    0    -1  
-$EndComp
-Wire Wire Line
-       10650 3400 10650 3500
-Wire Wire Line
-       10650 3500 10450 3500
-$Comp
-L power:GND #PWR027
-U 1 1 5EEF812A
-P 10550 3850
-F 0 "#PWR027" H 10550 3600 50  0001 C CNN
-F 1 "GND" H 10555 3677 50  0000 C CNN
-F 2 "" H 10550 3850 50  0001 C CNN
-F 3 "" H 10550 3850 50  0001 C CNN
-       1    10550 3850
-       1    0    0    -1  
-$EndComp
-Wire Wire Line
-       10450 3800 10550 3800
-Wire Wire Line
-       10550 3800 10550 3850
-Wire Wire Line
-       7900 4300 8250 4300
-Wire Wire Line
-       7900 4400 8500 4400
-Wire Wire Line
-       8250 4300 8250 4000
-Wire Wire Line
-       8250 4000 8500 4000
-Text Label 8400 4000 0    50   ~ 0
-TXA
-Text Label 8350 4600 0    50   ~ 0
-~CTSA
-Text Label 8350 4200 0    50   ~ 0
-~RTSA
-Text Label 8350 4400 0    50   ~ 0
-RXA
-$Comp
-L Connector:Conn_01x03_Male J1
-U 1 1 5F03FE41
-P 8550 4850
-F 0 "J1" H 8600 4700 50  0000 R CNN
-F 1 "SERB" H 8650 4600 50  0000 R CNN
-F 2 "" H 8550 4850 50  0001 C CNN
-F 3 "~" H 8550 4850 50  0001 C CNN
-       1    8550 4850
-       -1   0    0    -1  
-$EndComp
-Text Label 8000 4750 0    50   ~ 0
-RXDB
-Text Label 8000 4850 0    50   ~ 0
-TXDB
-Wire Wire Line
-       7900 4650 7900 4850
-Wire Wire Line
-       7900 4850 8350 4850
-Wire Wire Line
-       7900 4550 7950 4550
-Wire Wire Line
-       7950 4550 7950 4750
-Wire Wire Line
-       7950 4750 8350 4750
-$Comp
-L power:GND #PWR024
-U 1 1 5F09F89E
-P 8300 4950
-F 0 "#PWR024" H 8300 4700 50  0001 C CNN
-F 1 "GND" H 8305 4777 50  0000 C CNN
-F 2 "" H 8300 4950 50  0001 C CNN
-F 3 "" H 8300 4950 50  0001 C CNN
-       1    8300 4950
-       1    0    0    -1  
-$EndComp
-$Comp
-L Connector:DB9_Male J2
-U 1 1 5F10B0BC
-P 10850 4600
-F 0 "J2" H 10800 5150 50  0000 L CNN
-F 1 "SERA" H 10750 4050 50  0000 L CNN
-F 2 "" H 10850 4600 50  0001 C CNN
-F 3 " ~" H 10850 4600 50  0001 C CNN
-       1    10850 4600
-       1    0    0    1   
-$EndComp
-Wire Wire Line
-       10100 4000 10250 4000
-Wire Wire Line
-       10100 4400 10550 4400
-Wire Wire Line
-       10250 4000 10250 4600
-Wire Wire Line
-       10250 4600 10550 4600
-Wire Wire Line
-       10100 4200 10200 4200
-Wire Wire Line
-       10200 4200 10200 4500
-Wire Wire Line
-       10200 4500 10550 4500
-Wire Wire Line
-       10100 4600 10150 4600
-Wire Wire Line
-       10150 4600 10150 4700
-Wire Wire Line
-       10150 4700 10550 4700
-$Comp
-L power:GND #PWR028
-U 1 1 5F1878FB
-P 10550 5050
-F 0 "#PWR028" H 10550 4800 50  0001 C CNN
-F 1 "GND" H 10555 4877 50  0000 C CNN
-F 2 "" H 10550 5050 50  0001 C CNN
-F 3 "" H 10550 5050 50  0001 C CNN
-       1    10550 5050
-       1    0    0    -1  
-$EndComp
-Wire Wire Line
-       10550 5000 10550 5050
-NoConn ~ 10550 4200
-NoConn ~ 10550 4300
-NoConn ~ 10550 4800
-NoConn ~ 10550 4900
-Text Label 10350 4400 0    50   ~ 0
-SRTX
-Text Label 10350 4500 0    50   ~ 0
-SRTS
-Text Label 10350 4600 0    50   ~ 0
-STXA
-Text Label 10350 4700 0    50   ~ 0
-SCTS
-Wire Bus Line
-       3000 5850 4550 5850
-Connection ~ 6550 5050
-Connection ~ 6550 5600
-Text Label 6600 5250 0    50   ~ 0
-UCLK
-Wire Wire Line
-       6550 5250 6800 5250
-Connection ~ 7350 5600
-Wire Wire Line
-       1300 4050 1000 4050
-Text Label 1050 4050 0    50   ~ 0
-~WAIT
-$Comp
-L Device:R R3
-U 1 1 5F385448
-P 850 4050
-F 0 "R3" V 950 4050 50  0000 L CNN
-F 1 "4.7k" V 850 3950 50  0000 L CNN
-F 2 "" V 780 4050 50  0001 C CNN
-F 3 "~" H 850 4050 50  0001 C CNN
-       1    850  4050
-       0    -1   -1   0   
-$EndComp
-Text Label 1150 3150 0    50   ~ 0
-CLK
-Text Label 1050 3550 0    50   ~ 0
-~INT
-Wire Wire Line
-       1300 3550 1000 3550
-$Comp
-L power:VCC #PWR01
-U 1 1 5F3DA2B2
-P 700 3350
-F 0 "#PWR01" H 700 3200 50  0001 C CNN
-F 1 "VCC" H 700 3500 50  0000 C CNN
-F 2 "" H 700 3350 50  0001 C CNN
-F 3 "" H 700 3350 50  0001 C CNN
-       1    700  3350
-       1    0    0    -1  
-$EndComp
-$Comp
-L Device:R R2
-U 1 1 5F3D9F65
-P 850 3550
-F 0 "R2" V 950 3550 50  0000 L CNN
-F 1 "4.7k" V 850 3450 50  0000 L CNN
-F 2 "" V 780 3550 50  0001 C CNN
-F 3 "~" H 850 3550 50  0001 C CNN
-       1    850  3550
-       0    -1   1    0   
-$EndComp
-Wire Wire Line
-       700  3350 700  3450
-Connection ~ 700  3550
-Wire Wire Line
-       700  3550 700  4050
-$Comp
-L Device:C C2
-U 1 1 5F442E26
-P 1850 7150
-F 0 "C2" H 1900 7250 50  0000 L CNN
-F 1 "0.1uF" H 1900 7050 50  0000 L CNN
-F 2 "" H 1888 7000 50  0001 C CNN
-F 3 "~" H 1850 7150 50  0001 C CNN
-       1    1850 7150
-       1    0    0    -1  
-$EndComp
-$Comp
-L Device:C C3
-U 1 1 5F444327
-P 2150 7150
-F 0 "C3" H 2200 7250 50  0000 L CNN
-F 1 "0.1uF" H 2200 7050 50  0000 L CNN
-F 2 "" H 2188 7000 50  0001 C CNN
-F 3 "~" H 2150 7150 50  0001 C CNN
-       1    2150 7150
-       1    0    0    -1  
-$EndComp
-$Comp
-L Device:C C4
-U 1 1 5F444547
-P 2450 7150
-F 0 "C4" H 2500 7250 50  0000 L CNN
-F 1 "0.1uF" H 2500 7050 50  0000 L CNN
-F 2 "" H 2488 7000 50  0001 C CNN
-F 3 "~" H 2450 7150 50  0001 C CNN
-       1    2450 7150
-       1    0    0    -1  
-$EndComp
-$Comp
-L Device:C C6
-U 1 1 5F444841
-P 2750 7150
-F 0 "C6" H 2800 7250 50  0000 L CNN
-F 1 "0.1uF" H 2800 7050 50  0000 L CNN
-F 2 "" H 2788 7000 50  0001 C CNN
-F 3 "~" H 2750 7150 50  0001 C CNN
-       1    2750 7150
-       1    0    0    -1  
-$EndComp
-$Comp
-L Device:C C7
-U 1 1 5F444B0C
-P 3050 7150
-F 0 "C7" H 3100 7250 50  0000 L CNN
-F 1 "0.1uF" H 3100 7050 50  0000 L CNN
-F 2 "" H 3088 7000 50  0001 C CNN
-F 3 "~" H 3050 7150 50  0001 C CNN
-       1    3050 7150
-       1    0    0    -1  
-$EndComp
-$Comp
-L Device:C C8
-U 1 1 5F444DC1
-P 3350 7150
-F 0 "C8" H 3400 7250 50  0000 L CNN
-F 1 "0.1uF" H 3400 7050 50  0000 L CNN
-F 2 "" H 3388 7000 50  0001 C CNN
-F 3 "~" H 3350 7150 50  0001 C CNN
-       1    3350 7150
-       1    0    0    -1  
-$EndComp
-$Comp
-L power:GND #PWR010
-U 1 1 5F4451AA
-P 2600 7300
-F 0 "#PWR010" H 2600 7050 50  0001 C CNN
-F 1 "GND" H 2605 7127 50  0000 C CNN
-F 2 "" H 2600 7300 50  0001 C CNN
-F 3 "" H 2600 7300 50  0001 C CNN
-       1    2600 7300
-       1    0    0    -1  
-$EndComp
-$Comp
-L power:VCC #PWR09
-U 1 1 5F4467BC
-P 2600 7000
-F 0 "#PWR09" H 2600 6850 50  0001 C CNN
-F 1 "VCC" H 2600 7150 50  0000 C CNN
-F 2 "" H 2600 7000 50  0001 C CNN
-F 3 "" H 2600 7000 50  0001 C CNN
-       1    2600 7000
-       1    0    0    -1  
-$EndComp
-Wire Wire Line
-       1850 7000 2150 7000
-Connection ~ 2150 7000
-Wire Wire Line
-       2150 7000 2450 7000
-Connection ~ 2450 7000
-Wire Wire Line
-       2450 7000 2600 7000
-Connection ~ 2600 7000
-Wire Wire Line
-       2600 7000 2750 7000
-Connection ~ 2750 7000
-Wire Wire Line
-       2750 7000 3050 7000
-Connection ~ 3050 7000
-Wire Wire Line
-       3050 7000 3350 7000
-Wire Wire Line
-       1850 7300 2150 7300
-Connection ~ 2150 7300
-Wire Wire Line
-       2150 7300 2450 7300
-Connection ~ 2450 7300
-Wire Wire Line
-       2450 7300 2600 7300
-Connection ~ 2600 7300
-Wire Wire Line
-       2600 7300 2750 7300
-Connection ~ 2750 7300
-Wire Wire Line
-       2750 7300 3050 7300
-Connection ~ 3050 7300
-Wire Wire Line
-       3050 7300 3350 7300
-$Comp
-L Device:R R1
-U 1 1 5F463EA2
-P 850 3450
-F 0 "R1" V 950 3450 50  0000 L CNN
-F 1 "4.7k" V 850 3350 50  0000 L CNN
-F 2 "" V 780 3450 50  0001 C CNN
-F 3 "~" H 850 3450 50  0001 C CNN
-       1    850  3450
-       0    -1   -1   0   
-$EndComp
-Connection ~ 700  3450
-Wire Wire Line
-       700  3450 700  3550
-Wire Wire Line
-       1000 3450 1300 3450
-Text Label 1050 3450 0    50   ~ 0
-~NMI
-$Comp
-L 74xx:74LS05 U4
-U 2 1 5F4A99C1
-P 7300 6200
-F 0 "U4" H 7300 6050 50  0000 C CNN
-F 1 "74LS05" H 7400 6350 50  0000 C CNN
-F 2 "" H 7300 6200 50  0001 C CNN
-F 3 "http://www.ti.com/lit/gpn/sn74LS05" H 7300 6200 50  0001 C CNN
-       2    7300 6200
-       -1   0    0    1   
-$EndComp
-$Comp
-L Diode:1N4148 D1
-U 1 1 5F4AD646
-P 8050 6200
-F 0 "D1" H 8050 5984 50  0000 C CNN
-F 1 "1N4148" H 8050 6075 50  0000 C CNN
-F 2 "Diode_THT:D_DO-35_SOD27_P7.62mm_Horizontal" H 8050 6025 50  0001 C CNN
-F 3 "https://assets.nexperia.com/documents/data-sheet/1N4148_1N4448.pdf" H 8050 6200 50  0001 C CNN
-       1    8050 6200
-       -1   0    0    1   
-$EndComp
-$Comp
-L Device:R R8
-U 1 1 5F4AE323
-P 7750 6050
-F 0 "R8" H 7680 6004 50  0000 R CNN
-F 1 "4k7" H 7680 6095 50  0000 R CNN
-F 2 "" V 7680 6050 50  0001 C CNN
-F 3 "~" H 7750 6050 50  0001 C CNN
-       1    7750 6050
-       1    0    0    1   
-$EndComp
-$Comp
-L power:VCC #PWR023
-U 1 1 5F4B4193
-P 7750 5900
-F 0 "#PWR023" H 7750 5750 50  0001 C CNN
-F 1 "VCC" H 7767 6073 50  0000 C CNN
-F 2 "" H 7750 5900 50  0001 C CNN
-F 3 "" H 7750 5900 50  0001 C CNN
-       1    7750 5900
-       1    0    0    -1  
-$EndComp
-Wire Wire Line
-       7900 5250 7900 6200
-Connection ~ 7900 6200
-Wire Wire Line
-       8200 6200 8500 6200
-Text Label 8200 6200 0    50   ~ 0
-UARTEN
-Wire Wire Line
-       7600 6200 7750 6200
-Connection ~ 7750 6200
-Wire Wire Line
-       7750 6200 7900 6200
-Wire Wire Line
-       7000 6200 850  6200
-Wire Wire Line
-       850  6200 850  4250
-Wire Wire Line
-       850  4250 1000 4250
-Wire Wire Line
-       1000 4250 1000 4050
-Connection ~ 1000 4050
-Wire Wire Line
-       4400 1200 4700 1200
-Text Label 4400 1200 0    50   ~ 0
-UARTEN
-Wire Wire Line
-       7900 5150 8050 5150
-Text Label 7900 5150 0    50   ~ 0
-~INT
-Wire Wire Line
-       8300 4950 8350 4950
-Text Notes 3950 2300 0    50   ~ 0
-GAL16V8: glue.pld
-$Comp
-L power:VCC #PWR04
-U 1 1 5F6A583C
-P 1300 5150
-F 0 "#PWR04" H 1300 5000 50  0001 C CNN
-F 1 "VCC" H 1317 5323 50  0000 C CNN
-F 2 "" H 1300 5150 50  0001 C CNN
-F 3 "" H 1300 5150 50  0001 C CNN
-       1    1300 5150
-       1    0    0    -1  
-$EndComp
-Wire Wire Line
-       3300 1600 3100 1600
-Text Label 3200 1600 0    50   ~ 0
-~M1
-Wire Wire Line
-       3300 1900 3100 1900
-Text Label 3100 1900 0    50   ~ 0
-~RFSH
-Wire Wire Line
-       4400 1700 4700 1700
-Text Label 4400 1700 0    50   ~ 0
-~IACK
-Wire Wire Line
-       6800 4700 6600 4700
-Text Label 6600 4700 0    50   ~ 0
-~IACK
-$Comp
-L 74xx:74HC14 U1
-U 6 1 5F7B3414
-P 850 2400
-F 0 "U1" V 650 2400 50  0000 L CNN
-F 1 "74HC14" H 850 2250 50  0000 L CNN
-F 2 "" H 850 2400 50  0001 C CNN
-F 3 "http://www.ti.com/lit/gpn/sn74HC14" H 850 2400 50  0001 C CNN
-       6    850  2400
-       0    1    1    0   
-$EndComp
-Wire Wire Line
-       850  2700 850  3150
-Wire Wire Line
-       850  3150 1300 3150
-Wire Wire Line
-       850  2100 850  1850
-Text Label 850  2050 1    50   ~ 0
-UCLK
-Wire Wire Line
-       1300 1650 1350 1650
-$Comp
-L power:VCC #PWR03
-U 1 1 5F97FBA6
-P 1300 1650
-F 0 "#PWR03" H 1300 1500 50  0001 C CNN
-F 1 "VCC" H 1300 1800 50  0000 C CNN
-F 2 "" H 1300 1650 50  0001 C CNN
-F 3 "" H 1300 1650 50  0001 C CNN
-       1    1300 1650
-       1    0    0    -1  
-$EndComp
-Wire Wire Line
-       750  1350 750  1250
-$Comp
-L power:GND #PWR02
-U 1 1 5F96EC3C
-P 750 1350
-F 0 "#PWR02" H 750 1100 50  0001 C CNN
-F 1 "GND" H 755 1177 50  0000 C CNN
-F 2 "" H 750 1350 50  0001 C CNN
-F 3 "" H 750 1350 50  0001 C CNN
-       1    750  1350
-       1    0    0    -1  
-$EndComp
-Connection ~ 1200 1250
-Wire Wire Line
-       1150 1250 1200 1250
-$Comp
-L Switch:SW_Push SW1
-U 1 1 5F933400
-P 950 1250
-F 0 "SW1" H 950 1535 50  0000 C CNN
-F 1 "RESET" H 950 1444 50  0000 C CNN
-F 2 "" H 950 1450 50  0001 C CNN
-F 3 "~" H 950 1450 50  0001 C CNN
-       1    950  1250
-       1    0    0    -1  
-$EndComp
-Connection ~ 1850 1050
-Wire Wire Line
-       1500 1050 1850 1050
-Wire Wire Line
-       1500 950  1500 1050
-Wire Wire Line
-       1200 950  1500 950 
-Wire Wire Line
-       1200 1250 1350 1250
-$Comp
-L Device:R R5
-U 1 1 5F901EA0
-P 1200 1100
-F 0 "R5" H 1270 1146 50  0000 L CNN
-F 1 "1M" V 1200 1050 50  0000 L CNN
-F 2 "" V 1130 1100 50  0001 C CNN
-F 3 "~" H 1200 1100 50  0001 C CNN
-       1    1200 1100
-       1    0    0    -1  
-$EndComp
-NoConn ~ 1350 1450
-$Comp
-L power:VCC #PWR011
-U 1 1 5F8CF8A4
-P 2700 1150
-F 0 "#PWR011" H 2700 1000 50  0001 C CNN
-F 1 "VCC" H 2717 1323 50  0000 C CNN
-F 2 "" H 2700 1150 50  0001 C CNN
-F 3 "" H 2700 1150 50  0001 C CNN
-       1    2700 1150
-       1    0    0    -1  
-$EndComp
-Text Label 2350 1250 0    50   ~ 0
-RST
-Wire Wire Line
-       2350 1250 2550 1250
-Wire Wire Line
-       2700 1850 1850 1850
-Wire Wire Line
-       2350 1650 2700 1650
-Connection ~ 2700 1450
-Wire Wire Line
-       2700 1450 2700 1650
-$Comp
-L Device:C_Small C5
-U 1 1 5F880397
-P 2700 1750
-F 0 "C5" H 2609 1704 50  0000 R CNN
-F 1 "0.1uF" H 2609 1795 50  0000 R CNN
-F 2 "" H 2700 1750 50  0001 C CNN
-F 3 "~" H 2700 1750 50  0001 C CNN
-       1    2700 1750
-       1    0    0    1   
-$EndComp
-Wire Wire Line
-       2350 1450 2700 1450
-$Comp
-L Device:R R6
-U 1 1 5F8611FE
-P 2700 1300
-F 0 "R6" H 2750 1350 50  0000 L CNN
-F 1 "9.1k" V 2700 1200 50  0000 L CNN
-F 2 "" V 2630 1300 50  0001 C CNN
-F 3 "~" H 2700 1300 50  0001 C CNN
-       1    2700 1300
-       1    0    0    -1  
-$EndComp
-$Comp
-L power:VCC #PWR05
-U 1 1 5F860836
-P 1850 1050
-F 0 "#PWR05" H 1850 900 50  0001 C CNN
-F 1 "VCC" H 1867 1223 50  0000 C CNN
-F 2 "" H 1850 1050 50  0001 C CNN
-F 3 "" H 1850 1050 50  0001 C CNN
-       1    1850 1050
-       1    0    0    -1  
-$EndComp
-$Comp
-L power:GND #PWR06
-U 1 1 5F860553
-P 1850 1850
-F 0 "#PWR06" H 1850 1600 50  0001 C CNN
-F 1 "GND" H 1855 1677 50  0000 C CNN
-F 2 "" H 1850 1850 50  0001 C CNN
-F 3 "" H 1850 1850 50  0001 C CNN
-       1    1850 1850
-       1    0    0    -1  
-$EndComp
-$Comp
-L Timer:LM555 U2
-U 1 1 5F85DCB5
-P 1850 1450
-F 0 "U2" H 2000 1800 50  0000 C CNN
-F 1 "LM555" H 1850 1450 50  0000 C CNN
-F 2 "" H 1850 1450 50  0001 C CNN
-F 3 "http://www.ti.com/lit/ds/symlink/lm555.pdf" H 1850 1450 50  0001 C CNN
-       1    1850 1450
-       1    0    0    -1  
-$EndComp
-$Comp
-L 74xx:74LS05 U4
-U 1 1 5F9CB042
-P 2450 800
-F 0 "U4" H 2450 650 50  0000 C CNN
-F 1 "74LS05" H 2550 950 50  0000 C CNN
-F 2 "" H 2450 800 50  0001 C CNN
-F 3 "http://www.ti.com/lit/gpn/sn74LS05" H 2450 800 50  0001 C CNN
-       1    2450 800 
-       1    0    0    -1  
-$EndComp
-Wire Wire Line
-       2150 800  2150 1050
-Wire Wire Line
-       2150 1050 2550 1050
-Wire Wire Line
-       2550 1050 2550 1250
-Text Label 2850 800  0    50   ~ 0
-~RST
-$Comp
-L Device:R R4
-U 1 1 5FA0761C
-P 1050 2700
-F 0 "R4" H 1120 2746 50  0000 L CNN
-F 1 "4.7k" V 1050 2600 50  0000 L CNN
-F 2 "" V 980 2700 50  0001 C CNN
-F 3 "~" H 1050 2700 50  0001 C CNN
-       1    1050 2700
-       1    0    0    -1  
-$EndComp
-Text Notes 1350 700  0    50   ~ 0
-Power-on reset
-Wire Wire Line
-       2750 800  3000 800 
-Wire Wire Line
-       1050 2850 1300 2850
-Wire Wire Line
-       1050 2550 2000 2550
-Connection ~ 2000 2550
-Connection ~ 2700 1650
-Connection ~ 1850 1850
-$Comp
-L Device:C_Small C1
-U 1 1 5FC80F1C
-P 1200 1700
-F 0 "C1" H 1109 1654 50  0000 R CNN
-F 1 "0.1uF" H 1109 1745 50  0000 R CNN
-F 2 "" H 1200 1700 50  0001 C CNN
-F 3 "~" H 1200 1700 50  0001 C CNN
-       1    1200 1700
-       1    0    0    1   
-$EndComp
-Wire Wire Line
-       1200 1800 1200 1850
-Wire Wire Line
-       1200 1850 1850 1850
-Wire Wire Line
-       1200 1600 1200 1250
-NoConn ~ 1300 5250
-NoConn ~ 1300 4150
-Wire Wire Line
-       1300 3850 1100 3850
-Text Label 1200 3850 0    50   ~ 0
-~M1
-Wire Wire Line
-       1300 3950 1100 3950
-Text Label 1100 3950 0    50   ~ 0
-~RFSH
-Connection ~ 4700 2600
-Wire Bus Line
-       4600 2600 4700 2600
-Wire Bus Line
-       4700 2600 6350 2600
-Wire Bus Line
-       3150 2600 4700 2600
-Connection ~ 3000 2600
-Wire Wire Line
-       3300 2000 3100 2000
-Wire Wire Line
-       3300 2100 3100 2100
-Text Label 3200 2000 0    50   ~ 0
-~RD
-Text Label 3200 2100 0    50   ~ 0
-~WR
-$Comp
-L 74xx:74HC14 U1
-U 5 1 5FEF66B9
-P 5600 1300
-F 0 "U1" H 5550 1450 50  0000 L CNN
-F 1 "74HC14" H 5550 1150 50  0000 L CNN
-F 2 "" H 5600 1300 50  0001 C CNN
-F 3 "http://www.ti.com/lit/gpn/sn74HC14" H 5600 1300 50  0001 C CNN
-       5    5600 1300
-       1    0    0    -1  
-$EndComp
-$Comp
-L Device:C_Small C9
-U 1 1 5FEF828C
-P 5100 1100
-F 0 "C9" H 5008 1054 50  0000 R CNN
-F 1 "0.1uF" H 5008 1145 50  0000 R CNN
-F 2 "" H 5100 1100 50  0001 C CNN
-F 3 "~" H 5100 1100 50  0001 C CNN
-       1    5100 1100
-       -1   0    0    1   
-$EndComp
-$Comp
-L Device:R R7
-U 1 1 5FF0FBDF
-P 4850 1300
-F 0 "R7" V 4750 1250 50  0000 L CNN
-F 1 "120R" V 4850 1200 50  0000 L CNN
-F 2 "" V 4780 1300 50  0001 C CNN
-F 3 "~" H 4850 1300 50  0001 C CNN
-       1    4850 1300
-       0    1    1    0   
-$EndComp
-$Comp
-L power:VCC #PWR018
-U 1 1 5FF26567
-P 5100 1000
-F 0 "#PWR018" H 5100 850 50  0001 C CNN
-F 1 "VCC" H 5117 1173 50  0000 C CNN
-F 2 "" H 5100 1000 50  0001 C CNN
-F 3 "" H 5100 1000 50  0001 C CNN
-       1    5100 1000
-       1    0    0    -1  
-$EndComp
-$Comp
-L 74xx:74HC14 U1
-U 4 1 5FF485F0
-P 6200 1300
-F 0 "U1" H 6150 1450 50  0000 L CNN
-F 1 "74HC14" H 6150 1150 50  0000 L CNN
-F 2 "" H 6200 1300 50  0001 C CNN
-F 3 "http://www.ti.com/lit/gpn/sn74HC14" H 6200 1300 50  0001 C CNN
-       4    6200 1300
-       1    0    0    -1  
-$EndComp
-Wire Wire Line
-       6500 1300 6800 1300
-Wire Wire Line
-       5000 1300 5100 1300
-Wire Wire Line
-       5100 1200 5100 1300
-Wire Bus Line
-       6350 2600 6350 3200
-Wire Bus Line
-       3000 1100 3000 2600
-Wire Bus Line
-       6400 3400 6400 4400
-Wire Bus Line
-       4550 3600 4550 5850
-Wire Bus Line
-       3000 4650 3000 5850
-Wire Bus Line
-       3150 2600 3150 4800
-Wire Bus Line
-       4700 2600 4700 4600
-Wire Bus Line
-       3000 2600 3000 4250
-Connection ~ 5100 1300
-Wire Wire Line
-       5100 1300 5300 1300
-Text Notes 5350 950  0    50   ~ 0
-Delay the UART ~CS~ for a few ns to bring the\ntiming between R/~W~ and ~CS~ within spec\n(this might have been a red herring and not necessary)
-$EndSCHEMATC