Build Capital Quest for CoCo 3 with maps and emulator tests

This commit is contained in:
Brian Holman committed 2026-11-09 18:44:56 -07:00
commit 9f7d6f4786
44 files changed
+6238

No files matched your search

+17
View File
@@ -0,0 +1,17 @@
build/
obj/
*.o
*.d
*.s
*.lst
*.map
*.link
*.bin
*.dsk
*.DSK
.DS_Store
*.vccgrant
*connection*.json
assets/debug.png
__pycache__/
*.pyc
+96
View File
@@ -0,0 +1,96 @@
Build a complete, polished **50 States and Capitals Quiz** in C for the Color Computer 3, using the installed **VCC Plus** and its public MCP interface.
Implement and test the program. Work through sensible stages without stopping for routine implementation decisions.
### Project repository
Use the existing Git checkout on this machine at:
`~/Development/CoCo/CoCoCapitalQuiz`
The checkout is currently empty. Verify its Git root, branch, status and remote before editing, and preserve any work that may have appeared since these instructions were written. Create the quiz project within this checkout. Keep source, assets, attribution, reproducible build instructions and project documentation here; keep generated build outputs appropriately ignored.
### Development environment
- Target a **512 KB CoCo 3 with the 6809 processor**.
- Use VCC Plus’s bundled C toolchain and documented graphics/input facilities. Discover the live MCP capabilities and consult its installed manuals before choosing APIs.
- Use the installed application for builds, execution, captures and debugging. Do not require the VCC Plus source checkout, rebuild the emulator or patch its compilers.
- If the MCP connection is missing, guide me through connecting this C project. Continue independent design and data preparation while waiting.
- Preserve existing files and personal emulator media.
- If a genuine app limitation blocks progress, explain it and propose a reusable enhancement instead of using a private bridge or debugger memory writes.
### Quiz behavior
Include an accurate, verified dataset of **all 50 states and their capitals**. Alaska and Hawaii must be included. Washington, D.C. and territories are not additional questions.
At the beginning, offer:
1. **Multiple choice**
2. **Type the capital**
Shuffle all 50 states for each new quiz. Ask every state exactly once, with no repeats or omissions. Show **Question 1 of 50** through **Question 50 of 50**, along with the current score. Seed the shuffle using available timing and start-input information so ordinary new games do not always repeat the same order.
For each question, display the full state name and ask for its capital.
**Multiple choice:**
- Show four distinct choices: the correct capital and three capitals from other states.
- Randomize the correct answer’s position.
- Accept clearly labeled keyboard selections.
- After answering, explain whether it was correct and show the correct capital before continuing.
**Typed answers:**
- Accept capitals regardless of letter casing.
- Trim surrounding whitespace and tolerate repeated spaces.
- Support spaces, Backspace and Enter with bounded input handling.
- Support legitimate spelling variants such as “Saint Paul,” “St. Paul” and “St Paul.”
- Use a conservative spelling-distance check for answers close to the expected capital, including transposed letters. Say something like: **“That looks close. Check your spelling and try again.”**
- A near match must not automatically earn a point or reveal the correct spelling immediately. Let the player correct it or choose to reveal the answer and move on.
- An exact answer naming another state’s capital should be treated as incorrect, not automatically described as a spelling mistake.
- Count a successfully corrected spelling as correct, but track spelling corrections separately. Award at most one point per state.
### United States map
Use this as the visual reference:
https://www.fla-shop.com/svg/usa/
Display a recognizable U.S. map with state boundaries, including Alaska and Hawaii insets. **Clearly highlight the state currently being asked.** Keep the state name visible in text as well.
Small states must remain identifiable. Automatically show a regional enlargement or detail inset when useful, especially in the Northeast, while retaining enough national context to show where the region belongs.
Adapt the map for the CoCo’s graphics resolution and memory budget. Convert or simplify the source into compact drawing data or indexed graphics during project preparation; do not attempt to render SVG at runtime. Keep geometry, state identities and quiz answers consistently associated so the wrong state cannot be highlighted.
Preserve the map’s required attribution, source URL, license link and notice of adaptations in the project and an accessible credits screen. Keep text readable and use a highlight that stands out against neighboring states.
### Results and navigation
After question 50, show:
- Correct answers out of 50.
- Percentage correct.
- How many correct answers required spelling correction.
- A readable, paginated review of missed states, the player’s answers and the correct capitals.
Offer **Play Again** with a fresh shuffle and **Quit** back to BASIC. Explain controls on the title screen. Prevent a held answer key from accidentally answering the next question or skipping feedback.
### Testing and delivery
Test through the installed VCC Plus MCP tools using ordinary guest input and actual framebuffer captures.
Verify:
- All 50 state/capital pairs and their geometry associations.
- Every state appears once per quiz.
- Question numbering begins at 1 and ends at 50.
- Four unique multiple-choice options and varied answer positions.
- Correct uppercase, lowercase and mixed-case typed answers.
- Multiword capitals, supported aliases, misspellings, transpositions, wrong capitals and long input.
- Accurate scoring, spelling-correction accounting and final review.
- Alaska, Hawaii and small-state highlighting/zoom.
- Replay, key-release handling and clean exit.
Where useful, use verified C-line or function-entry stops and read-only snapshots to inspect quiz state. Use deterministic test seeds for reproducible checks without making ordinary play deterministic. Do not change guest memory or registers to manufacture successful gameplay.
Deliver the editable C project in the existing CoCoCapitalQuiz checkout, map assets and credits, runnable binary/disk image, concise build/play instructions, and a clear account of what actually passed or remains untested.
+674
View File
@@ -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>.
+45
View File
@@ -0,0 +1,45 @@
# Built by VCC Plus using its bundled CMOC/6809 tools. No emulator source needed.
CMOC ?= cmoc
PERL ?= perl
WRITECOCOFILE ?= writecocofile
INSTALL_LOADER ?= install-coco-boot-loader
VCC_CONFIGURATION ?= Release
ifeq ($(VCC_CONFIGURATION),Debug)
OPTIM = -O2 -fno-omit-frame-pointer
else
OPTIM = -O2
endif
ifeq ($(VCC_CONFIGURATION),Test)
CPPFLAGS += -DTEST_SEED=2709
endif
CPPFLAGS += -Iinclude
CFLAGS = --coco --intermediate --deps --stack-space=2048 $(OPTIM)
SOURCES = main.c src/quiz.c src/ui.c src/states.c src/map_data.c
OBJECTS = $(SOURCES:%.c=obj/%.o)
.PHONY: all build disk clean assets test
all: disk
build: build/CAPITAL.bin
disk: build/CAPITAL.dsk
build/CAPITAL.bin: $(OBJECTS)
@mkdir -p build
"$(CMOC)" --coco --intermediate --org=2000 --limit=7800 -o $@ $(OBJECTS) -lgime -linput -lbcontrol -lhirestxt
obj/%.o: %.c include/quiz.h include/ui.h include/map_data.h Makefile
@mkdir -p $(dir $@)
"$(CMOC)" $(CPPFLAGS) $(CFLAGS) --intdir=$(dir $@) -c -o $@ $<
obj/boot.bin: tools/boot.c Makefile
@mkdir -p obj
"$(CMOC)" --dos -O0 --limit=2800 -o $@ $<
build/CAPITAL.dsk: build/CAPITAL.bin obj/boot.bin
$(PERL) -e 'print chr(255) x (35*18*256)' > $@
"$(INSTALL_LOADER)" $@ obj/boot.bin
"$(WRITECOCOFILE)" $@ build/CAPITAL.bin
assets:
python3 tools/prepare_assets.py
test:
@mkdir -p build
cc -std=c99 -Wall -Wextra -Werror -DHOST_TEST -Iinclude tests/test_quiz.c src/quiz.c src/states.c -o build/test_quiz
./build/test_quiz
python3 tests/check_assets.py
clean:
rm -rf obj build
-include $(OBJECTS:.o=.d)
+82
View File
@@ -0,0 +1,82 @@
# Capital Quest — 50 States and Capitals
A C geography quiz for a **512 KB Color Computer 3 / Motorola 6809**, built with
**VCC Plus 3.5.0** and its bundled CMOC toolchain. A 320×192, 16-color national
map highlights the current state. Northeast and Hawaii detail views retain
the national overview.
The application was generated with **ChatGPT Codex** using **GPT-6.1 Sol High**,
following the project brief in [CHATGPT_PROMPT.md](CHATGPT_PROMPT.md). Development
included builds and gameplay tests through VCC Plus’s public MCP interface.
## Build and play
1. In VCC Plus, choose **Develop → C Development → Open**, and select this folder.
2. Select **Release**, then **Build** (the declared target builds the disk).
3. Use **Show Build Products** to find `build/CAPITAL.dsk` and `CAPITAL.bin` in
the workbench's build snapshot. A delivered copy is also in this checkout's
ignored `build/` folder after the implementation session.
4. Mount your own copy of `CAPITAL.dsk` in a 512 KB 6809 Disk BASIC machine.
Type **DOS**, or `LOADM"CAPITAL.BIN":EXEC`. Keep personal media separate.
Title: **1** multiple choice, **2** type the capital, **C** credits, **Q** quit.
Multiple choice: **1–4**. Typed answers: letters/spaces/periods, **Backspace**
(CoCo Left) and **Enter**. The Mac's Escape maps to CoCo Break and reveals an
answer. A near spelling offers **R** to edit the existing answer or **V** to
reveal. Only an exact/accepted alias earns a point. A successfully corrected
answer earns one point and increments the separate correction count.
Release keys between presses; **Space** advances after feedback.
After all 50 questions: **R** paginated missed-answer review, **N** next review
page, **B** results, **P** play again, **Q** return to BASIC. Replay returns to
the mode menu. Normal games mix BASIC timer values, waiting-loop timing and
start input into the random seed. The program uses the CoCo 3's documented
high-speed clock during play and restores normal speed on exit.
## Reproduce from the command line
The workbench is the supported build/test path. An equivalent offline build
uses the *installed* app's bundled tools, without an emulator source checkout:
```sh
export PATH="/Applications/VCC Plus.app/Contents/Resources/Toolchain/bin:$PATH"
make clean
make VCC_CONFIGURATION=Release disk
```
`Release` uses `-O2`. `Debug` retains frame pointers while using `-O2` to
fit the complete game in the same strict memory budget. `Test` uses `-O2`
and seed **2709** for reproducible
ordinary gameplay. Clean before switching configurations because the Makefile
uses a common object directory. VCC Plus builds fresh snapshots automatically.
Code and static data are linked at `$2000`, limited to below `$7800`, with a
2 KiB stack allowance below `$8000`. The public GIME library reserves physical
`$40000–$4FFFF` for its two graphics pages. No raw graphics/MMU register writes,
SVG parsing, dynamic allocation or disk writes occur during quiz play.
```sh
python3 tools/prepare_assets.py # offline map/data generation
make test # host logic and geometry checks
```
The editable inputs are `data/states.tsv`, `data/map-seeds.json`,
`assets/usa-source.svg`, `main.c`, `src/quiz.c` and `src/ui.c`. Generated drawing
and state C files are retained for toolchain-only builds. Build outputs are
ignored. The public MCP JSON-RPC client in `tools/vcc_mcp.py` takes an exported
private grant path; keep that grant outside Git. See [test evidence](docs/TESTING.md)
for actual emulator coverage and limitations, and [credits](assets/CREDITS.md)
for map attribution and licenses.
For the complete public-MCP regression suite, export a private connection with
both Make and disposable playtests enabled, then run:
```sh
PYTHONDONTWRITEBYTECODE=1 python3 tests/playtest.py /private/path/connection.json \
--evidence /tmp/capital-quiz-evidence
```
This builds the advertised Test configuration, plays two complete quizzes with
ordinary physical keys, checks actual framebuffer text and state fill pixels,
and retains the test disks. Evidence stays outside the checkout until tests
finish so VCC Plus's watched source revision remains stable.
+156
View File
@@ -0,0 +1,156 @@
bcontrol 0.1.6
Public domain (upstream dedication)
--- Joystick.h ---
/* Joystick.h - Autonomous joystick functions for the CoCo.
By Pierre Sarrazin <http://sarrazip.com/>
This file is in the public domain.
*/
--- Joystick_private.h ---
/* Joystick_private.h
By Pierre Sarrazin <http://sarrazip.com/>
This file is in the public domain.
*/
--- Keyboard.c ---
/* keyin.c - Autonomous keyboard functions for the CoCo.
By Pierre Sarrazin <http://sarrazip.com/>
This file is in the public domain, except the parts that come from Color Basic.
*/
--- Keyboard.h ---
/* Keyboard.h - Autonomous keyboard functions for the CoCo.
By Pierre Sarrazin <http://sarrazip.com/>
This file is in the public domain.
*/
--- README.md ---
BControl
========
By Pierre Sarrazin <http://sarrazip.com/>.
This library is in the public domain, except the parts of Keyboard.c
that come from Color Basic.
This library offers functions similar to Color Basic's INKEY$,
JOYSTK and BUTTON. It does not assume the presence of the Color
Basic interpreter.
# Usage
To use the Keyboard object, instante an instance, then call
`Keyboard_init()` on it. Then call `Keyboard_poll()` the same way
one would call INKEY$ in a Basic program. Call `Keyboard_shutdown()`
when finished with the Keyboard object.
To read the joystick axis values and button states on a CoCo or
Dragon, call `Joystick_getAxisValues()` and `Joystick_getButtonStates()`.
No initialization step is needed.
However, to help the portability to OS-9 of a program that uses
the joystick, `Joystick_getAxisValuesAndButtonState()` should be used
instead of the other functions of Joystick.h.
See Keyboard.h and Joystick.h for details.
# Dragon support
To compile for the Dragon, pass TARGET=dragon to make.
# OS-9 support
To compile for OS-9, pass TARGET=OS9 to make.
# Version history
0.1.0 2018-11-25 First public release.
0.1.1 2019-06-03 Partial support for OS-9 added:
setScreenBuffer() not supported.
Removed the (non portable) startInCapsLock parameter
from `Keyboard_init()`.
0.1.2 2019-09-21 Added missing OS9RawTerminal.h.
0.1.3 2020-06-27 Added `Joystick_selectAnalogMuxInputs()` and
`Joystick_compareAxis()`, which allow custom, faster
axis polling (but is not usable under OS-9).
0.1.4 2022-11-12 Fixed the Dragon executable extension in the makefile.
Added `Joystick_getAxisValuesAndButtonState()`, which
targets a single joystick and also works under OS-9.
Include "Joystick.h" to use it.
0.1.5 2024-08-29 Joystick comparator read routine slightly optimized
with inline asm. (Not applicable to OS-9 version.)
Centralized some function prototypes.
Removed UTF-8 characters from Keyboard.c.
0.1.6 2026-09-06 Added Joystick_getButtonStates2().
Optimized Joystick_selectAnalogMuxInputs().
Optimized Joystick_compareAxis().
--- bcontrol.c ---
/* bcontrol.c - Test and demo program.
By Pierre Sarrazin <http://sarrazip.com/>
This file is in the public domain.
*/
--- compareAxis.c ---
/* compareAxis.c - Autonomous joystick functions for the CoCo.
By Pierre Sarrazin <http://sarrazip.com/>
This file is in the public domain.
*/
--- disableSound.c ---
/* disableSound.c
By Pierre Sarrazin <http://sarrazip.com/>
This file is in the public domain.
*/
--- enableSound.c ---
/* enableSound.c
By Pierre Sarrazin <http://sarrazip.com/>
This file is in the public domain.
*/
--- getAxisValues.c ---
/* getAxisValues.c
By Pierre Sarrazin <http://sarrazip.com/>
This file is in the public domain.
The current implementation is based on Color Basic's.
Improvements are welcome.
*/
--- getAxisValuesAndButtonState.c ---
/* getAxisValuesAndButtonState.c - Autonomous joystick functions for the CoCo.
By Pierre Sarrazin <http://sarrazip.com/>
This file is in the public domain.
*/
--- getButtonStates.c ---
/* getButtonStates.c
By Pierre Sarrazin <http://sarrazip.com/>
This file is in the public domain.
*/
--- getButtonStates2.c ---
/* getButtonStates2.c
By Pierre Sarrazin <http://sarrazip.com/>
This file is in the public domain.
*/
--- readComparatorMultipleTries.c ---
/* readComparatorMultipleTries.c - Autonomous joystick functions for the CoCo.
By Pierre Sarrazin <http://sarrazip.com/>
This file is in the public domain.
*/
--- selectAnalogMuxInputs.c ---
/* selectAnalogMuxInputs.c
By Pierre Sarrazin <http://sarrazip.com/>
This file is in the public domain.
*/
+31
View File
@@ -0,0 +1,31 @@
# Map and font credits
Map: **© Fla-shop.com**. Reference and license statement:
<https://www.fla-shop.com/svg/usa/>
Original SVG retrieved 2026-11-09:
<https://www.fla-shop.com/svg/usa/usa-albers-2000-1200.svg>
Licensed under **Creative Commons Attribution 4.0 International**:
<https://creativecommons.org/licenses/by/4.0/>
The original copyright/license comment is preserved in `usa-source.svg`.
Adaptations: straight-path scan conversion, state-region identity assignment,
resolution reduction, one-pixel boundary simplification, recoloring, run-length
encoding, and Northeast/Hawaii detail crops. The national artwork already
contains Alaska and Hawaii insets. Insets are not to a common scale. Islands
smaller than a guest pixel may disappear. No endorsement is implied.
`C` on the title screen opens the in-game credits, including these source and
license URLs and the adaptation notice.
Font: Pierre Sarrazin's **font5x8**, public domain, linked from VCC Plus's bundled
HiresTxt library. Header identifies the author and public-domain dedication.
Disk boot helper: Pierre Sarrazin, **autostart.c 0.1.2**, public domain; adapted
from the installed Hello Disk template to load `CAPITAL.BIN`.
CMOC and LWTOOLS are supplied by VCC Plus; the GIME helper is supplied by VCC
Plus (its public header is marked GPL-3.0-or-later). This project is distributed
under GPL-3.0-or-later to accommodate linked library code. See VCC Plus →
Licenses & Notices for the bundled toolchain's notices and source information.
The map remains CC BY 4.0 and the font/boot helper remain public domain.
+562
View File
@@ -0,0 +1,562 @@
hirestxt 0.5.1
Public domain (upstream dedication)
--- README.md ---
hirestxt
========
By Pierre Sarrazin <http://sarrazip.com/>
This library is in the public domain.
It implements a software 51x24 or 42x24 black-on-green PMODE 4 text
screen (256x192x2), or a 64x24 16-color text screen in the CoCo 3's
320x200x16 graphics mode. It redirects printf() to that screen.
Useful to get true lowercase, including Latin-1 accented characters,
on all CoCos, on the Dragon, and on NitrOS-9.
Optionally supports several VT52 terminal sequences.
A sample program is included. See the *Demo* section in this file.
This library is intended to be compiled by CMOC.
See the [CMOC home page](http://sarrazip.com/dev/cmoc.html).
## Setup
The instructions apply when targetting the Color Basic environment.
Do the following to initialize the 51x24 text screen at $0E00 on a CoCo
or Dragon.
Put this directive somewhere at the beginning of the C file in question:
#include "hirestxt.h"
Then set up PMODE 4 green/black graphics, like this:
width(32); /* PMODE graphics will only appear from 32x16 (does nothing on CoCo 1&2) */
pmode(4, (byte *) 0x0E00);
pcls(255);
screen(1, 0); /* green/black */
Then define a `HiResTextScreenInit` object:
struct HiResTextScreenInit init =
{
51, /* characters per row */
writeCharAt_51cols, /* must be consistent with previous field */
0x0E00,
TRUE /* redirects printf() to the 51x24 text screen */
(word *) 0x112, /* pointer to a 60 Hz async counter (Color Basic's TIMER) */
0, /* default cursor blinking rate */
NULL, /* use inkey(), i.e., Color Basic's INKEY$ */
NULL, /* no sound on '\a' */
};
Then call `initHiResTextScreen()` with the address of this object:
initHiResTextScreen(&init);
To use the 42x24 mode, replace 51 and `writeCharAt_51cols` with 42 and
`writeCharAt_42cols`.
Optionally, to get the screen address from Basic instead of assuming
$0E00, use this expression in the `HiResTextScreenInit` struct initializer:
(byte *) * (byte *) 0x00BC << 8
Then, see hirestxt.h for the available functions.
To compile with this library, pass `-I <dir>` to cmoc, where `<dir>` is
the directory where hirestxt.h is.
To link with this library, specify `-L <dir> -lhirestxt` to the cmoc
invocation that does the linking. This specifies where the libhirestxt.a
file can be found.
## Demo
The demo is compiled as `hirestxt.bin` for the CoCo and Dragon Basic
environments, and `hirestxt` for OS-9.
Under OS-9, the demo must be executed from a 32x16 terminal.
## Dragon support
To compile for the Dragon, pass `TARGET=dragon` to make.
## OS-9 support
To compile for OS-9, pass `TARGET=os9` to make.
This generates a demo in an OS-9 executable named `hirestxt`. Use the
[ToolShed](https://sourceforge.net/projects/toolshed/) `os9` command
to transfer this executable to an OS-9 virtual hard-disk (for example)
and to give it the execution attributes:
os9 copy -r hirestxt the-disk.vhd,/CMDS/
os9 attr -epe the-disk.vhd,/CMDS/hirestxt
Under OS-9, the demo must be executed from a 32x16 terminal.
This has been tested with [NitrOS-9](http://www.nitros9.org/battle.html)
EOU 1.0.1 and [CMOC](http://sarrazip.com/dev/cmoc.html) 0.1.89.
The /nil driver must be present.
## VT52 Support
A subset of [VT52](https://en.wikipedia.org/wiki/VT52) terminal sequences
are supported by the code in function processConsoleOutChar() of
processConsoleOutChar.c.
If this support is not needed, the code for it can be omitted by compiling
the library with HIRESTEXT_NO_VT52.
## License
This library is in the public domain.
## Version history
0.1.0 - 2016-05-01 - First public release.
0.1.1 - 2016-09-12 - Adapted to CMOC 0.1.31 re: inline asm.
0.1.2 - 2016-12-26 - HIRESTEXT_NO_VT52 to avoid VT52 code.
0.2.0 - 2017-12-01 - Adapted to modular compilation under CMOC 0.1.43.
0.2.1 - 2018-04-03 - Adapted to modular compilation under CMOC 0.1.51.
0.3.0 - 2018-09-20 - Added 42x24 text screen and 5x8 font.
Adapted to CMOC 0.1.53.
0.3.1 - 2018-11-25 - Fixed linking error re: putBitmaskInScreenWord() in 42x24 mode.
Now compilable for the Dragon (make TARGET=dragon).
0.4.0 - 2023-08-19 - initHiResTextScreen() and closeHiResTextScreen() do not change the
screen mode themselves anymore -- see the next section.
The HiResTextScreenInit struct must now receive a pointer
to a timer word.
It may also receive a pointer to an inkey-like function.
Replaced textScreenPageNum in struct HiResTextScreenInit with
the textScreenBuffer field, which removes a dependency on the SAM chip --
see the next section.
Stopped exporting the global textScreenBuffer variable.
Removed the setTextScreenAddress() function.
Fixed typo in the name of the internal oldCHROUT global variable.
Merged all library code into a single .a file.
Most functions are now in their own file, to optimize the final executable size.
Most global variables are now fields of a single global struct instance.
Now usable under OS-9 (assumes that the /nil driver is installed).
Slightly optimized character writing routine.
0.4.1 - 2023-09-02 - Added setInverseVideoMode() and setBoldMode() which allow writing
characters in inverted colors and/or in bold.
Added support for VT52 sequences <ESC> p and <ESC> q to turn inverse
video on of off, and <ESC> E to home the cursor and clear the screen.
0.4.2 - 2024-11-28 - Added showOS9PMode4Screen(), quitOS9Graphics(), OS9Timer_init(),
OS9Timer_shutdown() and OS9Timer_getTimerAddress() under OS-9.
Fixed a bug in the demo where the column of letters was displayed
too slowly.
0.5.0 - 2025-03-14 - Added support for writing to a 64x24 text screen on a CoCo 3 320x192x16
graphics screen. See initHiResTextScreen2(), setForegroundColor() et al.
hirestxt-demo.c gives an example.
The screen is now cleared from top to bottom instead of bottom up.
The demo now plays an audible bell character.
0.5.1 - 2025-09-27 - Removed UTF-8 non-breaking space character from hirestxt-demo.c and
hirestxt.h, to resolve a compilation issue with GCC 14.2.0.
## Using version 0.5.x
Version 0.5.0 introduced support for a 64x24 text mode in the CoCo 3 320x192x16 graphics mode.
This text mode is slower than using the CoCo 3's hardware 40- or 80-column text screens, but it
allows:
* using the same hirestxt-based code to display text on a CoCo 1, 2 or 3, on a Dragon, or
on NitrOS-9;
* mixing text and graphics on the same screen, using a narrower font than the byte-aligned
font used by Basic's HPRINT command.
The hirestxt-demo.c program shows examples of how to use both the CoCo 3 64x24 mode and the
original 51x24 and 42x24 modes on a 256x192x2 (PMODE 4) screen.
## Adapting to version 0.4.x
The instructions apply when targetting the Color Basic environment.
- Where the `HiResTextScreenInit` is initialized, add these values:
- A value for the `timer` field, which must be the address of a 16-bit word that
gets incremented 60 times per second.
- A zero for the `cursorAnimationLowTimerByteMask` field.
- A NULL value for the `inkeyFuncPtr` field, to have the library use `inkey()`,
as before, to poll the keyboard.
- A NULL value for the `bellFuncPtr` field, to have a call to Color Basic's
SOUND 1,1, as before, when character 7 is sent to the screen.
- Execute this code before calling `initHiResTextScreen()`:
initCoCoSupport();
width(32);
pmode(4, A);
pcls(255);
screen(1, 0);
Replace `A` with the address put in the `textScreenBuffer` field of struct
`HiResTextScreenInit`.
To use the current address where ECB would draw PMODE 4 graphics, use this
expression: `(byte *) * (byte *) 0x00BC << 8`
(This takes $BC, sees it as a byte pointer, gets that byte, sees it as a
16-bit address, then shifts this address 8 bits left, to form the actual
address of the screen buffer.)
Under other platforms, execute platform-specific code to set up a 256x192
green/black 2-color graphics mode, then put its buffer address in
`textScreenBuffer`.
- Execute this code after calling `closeHiResTextScreen()`:
pmode(0, 0);
cls(255);
screen(0, 0);
- If the program was using the `textScreenBuffer` global variable, it
should now stop using it and use the address that it puts in the
`textScreenBuffer` field of `HiResTextScreenInit` instead.
- Similarly, the `hiResWidth` global variable has been replaced with
the `numColumns` field of `HiResTextScreenInit`.
- The `textPosX` and `textPosY` global variables have been removed from
the public interface. Functions `getCursorColumn()` and `getCursorRow()`
have been added. The cursor can be moved with `moveCursor()`.
--- animateCursor.c ---
/* animateCursor.c
By Pierre Sarrazin <http://sarrazip.com/>
This file is in the public domain.
*/
--- clear.c ---
/* clear.c
By Pierre Sarrazin <http://sarrazip.com/>
This file is in the public domain.
*/
--- clearRowsToEOS.c ---
/* clearRowsToEOS.c
By Pierre Sarrazin <http://sarrazip.com/>
This file is in the public domain.
*/
--- closeHiResTextScreen.c ---
/* closeHiResTextScreen.c
By Pierre Sarrazin <http://sarrazip.com/>
This file is in the public domain.
*/
--- clrscr.c ---
/* clrscr.c
By Pierre Sarrazin <http://sarrazip.com/>
This file is in the public domain.
*/
--- clrtobot.c ---
/* clrtobot.c
By Pierre Sarrazin <http://sarrazip.com/>
This file is in the public domain.
*/
--- clrtoeol.c ---
/* clrtoeol.c
By Pierre Sarrazin <http://sarrazip.com/>
This file is in the public domain.
*/
--- fillNybbles.c ---
/* initHiResTextScreen2.c
By Pierre Sarrazin <http://sarrazip.com/>
This file is in the public domain.
*/
--- font4x8.c ---
/* font4x8.c - ISO-8859-1 font for a 51x24 software text screen.
By Pierre Sarrazin <http://sarrazip.com/>
This file is in the public domain.
*/
--- font4x8.h ---
/* font4x8.h - ISO-8859-1 font for a 51x24 software text screen.
By Pierre Sarrazin <http://sarrazip.com/>
This file is in the public domain.
*/
--- font5x8.c ---
/* font5x8.c - ISO-8859-1 font for a 42x24 software text screen.
By Pierre Sarrazin <http://sarrazip.com/>
This file is in the public domain.
*/
--- font5x8.h ---
/* font5x8.h - ISO-8859-1 font for a 42x24 software text screen.
By Pierre Sarrazin <http://sarrazip.com/>
This file is in the public domain.
*/
--- getCursorColumn.c ---
/* getCursorColumn.c
By Pierre Sarrazin <http://sarrazip.com/>
This file is in the public domain.
*/
--- getCursorRow.c ---
/* getCursorRow.c
By Pierre Sarrazin <http://sarrazip.com/>
This file is in the public domain.
*/
--- hirestxt-demo.c ---
/* hirestxt-demo.c - Example program that uses hirestxt.h.
By Pierre Sarrazin <http://sarrazip.com/>
This file is in the public domain.
This demo uses VT52 sequences.
The library must NOT have been compiled with HIRESTEXT_NO_VT52.
*/
--- hirestxt.h ---
/* hirestxt.h - 51x24 black-on-green PMODE 4 text screen.
By Pierre Sarrazin <http://sarrazip.com/>
This file is in the public domain.
Quick Guide:
- Call initHiResTextScreen() first.
- End with a call to closeHiResTextScreen().
- #define HIRESTEXT_NO_VT52 to avoid compiling the VT52 code.
*/
--- hirestxt_private.h ---
/* hirestxt_private.h - 51x24 black-on-green PMODE 4 text screen.
By Pierre Sarrazin <http://sarrazip.com/>
This file is in the public domain.
*/
--- init.c ---
/* init.c
By Pierre Sarrazin <http://sarrazip.com/>
This file is in the public domain.
*/
--- initHiResTextScreen.c ---
/* initHiResTextScreen.c
By Pierre Sarrazin <http://sarrazip.com/>
This file is in the public domain.
*/
--- initHiResTextScreen2.c ---
/* initHiResTextScreen2.c
By Pierre Sarrazin <http://sarrazip.com/>
This file is in the public domain.
*/
--- initVT52.c ---
/* initVT52.c
By Pierre Sarrazin <http://sarrazip.com/>
This file is in the public domain.
*/
--- invertPixelsAtCursor.c ---
/* invertPixelsAtCursor.c
By Pierre Sarrazin <http://sarrazip.com/>
This file is in the public domain.
*/
--- moveCursor.c ---
/* moveCursor.c
By Pierre Sarrazin <http://sarrazip.com/>
This file is in the public domain.
*/
--- os9timer.c ---
/* os9timer.c
By Pierre Sarrazin <http://sarrazip.com/>
This file is in the public domain.
*/
--- processConsoleOutChar.c ---
/* processConsoleOutChar.c
By Pierre Sarrazin <http://sarrazip.com/>
This file is in the public domain.
*/
--- putBitmaskInScreenWord.c ---
/* putBitmaskInScreenWord.c
By Pierre Sarrazin <http://sarrazip.com/>
This file is in the public domain.
*/
--- quitOS9Graphics.c ---
/* quitOS9Graphics.c
By Pierre Sarrazin <http://sarrazip.com/>
This file is in the public domain.
*/
--- removeCursor.c ---
/* removeCursor.c
By Pierre Sarrazin <http://sarrazip.com/>
This file is in the public domain.
*/
--- scrollTextScreenUp.c ---
/* scrollTextScreenUp.c
By Pierre Sarrazin <http://sarrazip.com/>
This file is in the public domain.
*/
--- setBackgroundColor.c ---
/* setBackgroundColor.c
By Pierre Sarrazin <http://sarrazip.com/>
This file is in the public domain.
*/
--- setBoldMode.c ---
/* setBoldMode.c
By Pierre Sarrazin <http://sarrazip.com/>
This file is in the public domain.
*/
--- setForegroundBoldColor.c ---
/* setForegroundBoldColor.c
By Pierre Sarrazin <http://sarrazip.com/>
This file is in the public domain.
*/
--- setForegroundColor.c ---
/* setForegroundColor.c
By Pierre Sarrazin <http://sarrazip.com/>
This file is in the public domain.
*/
--- setInverseVideoMode.c ---
/* setInverseVideoMode.c
By Pierre Sarrazin <http://sarrazip.com/>
This file is in the public domain.
*/
--- showOS9PMode4Screen.c ---
/* showOS9PMode4Screen.c
By Pierre Sarrazin <http://sarrazip.com/>
This file is in the public domain.
*/
--- waitKeyBlinkingCursor.c ---
/* waitKeyBlinkingCursor.c
By Pierre Sarrazin <http://sarrazip.com/>
This file is in the public domain.
*/
--- writeCenteredLine.c ---
/* writeCenteredLine.c
By Pierre Sarrazin <http://sarrazip.com/>
This file is in the public domain.
*/
--- writeChar.c ---
/* writeChar.c
By Pierre Sarrazin <http://sarrazip.com/>
This file is in the public domain.
*/
--- writeCharAt.c ---
/* writeCharAt.c
By Pierre Sarrazin <http://sarrazip.com/>
This file is in the public domain.
*/
--- writeCharAt_320x16.c ---
/* writeCharAt_320x16.c
By Pierre Sarrazin <http://sarrazip.com/>
This file is in the public domain.
*/
--- writeCharAt_42cols.c ---
/* writeCharAt_42cols.c
By Pierre Sarrazin <http://sarrazip.com/>
This file is in the public domain.
*/
--- writeCharAt_51cols.c ---
/* writeCharAt_51cols.c
By Pierre Sarrazin <http://sarrazip.com/>
This file is in the public domain.
*/
--- writeDecWord.c ---
/* writeDecWord.c
By Pierre Sarrazin <http://sarrazip.com/>
This file is in the public domain.
*/
--- writeString.c ---
/* writeString.c
By Pierre Sarrazin <http://sarrazip.com/>
This file is in the public domain.
*/
+674
View File
@@ -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>.
Binary file not shown.

After

Width:  |  Height:  |  Size: 398 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 935 B

+521
View File
@@ -0,0 +1,521 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--
******* (c) Fla-shop.com | SVG map of USA *******
******* Free for personal and commercial use under CC-BY-4.0 license *******
******* Attribution is required https://www.fla-shop.com *******
-->
<svg viewBox="0 0 2000 1200" version="1.1" xmlns="http://www.w3.org/2000/svg">
<path
id="outline"
d="m 173.6,1157 h -1.5 -1.4 l 0.7,-4 h 3.6 z m -10.8,-4 -1.5,4 h -3.6 l 0.8,-4 h 1.4 z m 16.5,0 h -2.1 -0.7 1.4 2.1 z m 8.7,0 h -1.5 -2.1 -3.6 l 2.1,-4 h 4.3 1.5 z m -33.2,4 H 152 l -5.1,-4 h -5 -7.2 l -0.7,-4 h 7.9 2.9 3.6 v 0 l 2.8,4 h 4.4 z m 1501.2,-4 -5,4 1,-8 12,-8 3,4 3,4 h -8 z m -1537.1,-8 5,4 h 2.9 2.9 -0.8 l -2.8,4 h -7.2 l -4.4,-4 h -6.4 v -8 l 4.3,4 z m 114.4,-4 h 0.8 l -1.5,4 h -5.7 l -3.6,-4 -0.8,4 h -0.7 l -2.1,4 h -2.9 l -4.3,4 h -5.1 l -2.9,-4 -2.8,4 h -6.5 l -2.2,4 -2.9,-4 6.5,-4 5.8,-4 h 2.9 l 3.6,4 h 2.8 l 0.8,-4 v -4 h 2.1 2.2 1.4 3.6 1.5 l 0.7,-4 h 2.1 2.9 l 2.2,4 z m -149.01,0 h 0.72 -2.88 l -2.88,-4 1.44,-4 z m 7.2,-8 -0.72,4 -4.32,-4 h 2.16 2.16 z m -18.72,-4 h -3.6 l -1.44,-4 h 3.6 2.16 v 4 z m -28.12,-24 -1.44,4 -2.16,-4 5.04,-4 h 1.44 z m 721.45,8 v 8 h 3.6 l 1.6,4 6.4,4 -10,8 -6,4 -4.8,-4 -8,4 -7.2,16 -8.8,-12 -2,-20 -3.6,-8 8,-8 -2.8,-8 2,-4 28,12 z M 44.65,1097 h -4.32 l -5.02,-4 h 2.16 4.3 z m 300.25,4 -5,4 -2.9,4 -2.1,-4 h -1.5 v 4 l -2.9,4 v 0 l -2.8,4 -2.9,-4 2.1,-4 -2.8,-8 4.3,-4 3.6,4 4.3,-4 v -8 l 5,-4 h 5.1 v 4 h -5.8 v 4 l 2.2,4 z m 363.6,-16 h -10.8 l 8.8,-4 z m -13.6,-8 h -5.6 l -5.2,-8 h 4.4 7.2 z m 8.8,-16 5.6,8 h 9.2 l 10.4,4 v 4 l -3.6,4 -14,4 -2,-12 h -3.6 l -5.2,-4 v -4 z m 333.3,36 3,12 -4,-12 2,-16 v -4 l 3,-8 3,-4 3,-8 h 3 l -7,12 -5,12 z m -348.5,-44 1.2,4 h 9.6 l -6,4 h -19.2 l 3.6,-4 h 9.2 z m -445.8,4 h -5 l -7.2,-8 h 10 2.2 z m 419,-8 -0.8,4 h -7.2 -5.6 -7.2 l -5.2,-12 7.2,-4 4.4,-4 6,8 0.4,4 3.2,4 z m -464.4,-12 -3.6,4 -3.6,-4 1.5,-4 3.6,4 z m 367.2,-12 -4.8,4 h -3.2 l 0.8,-4 5.2,-4 h 2.8 z m 26.8,0 h -10 l -6.8,-4 0.8,-4 8,-4 h 7.2 l 5.2,4 z m 544.7,-28.4 -13,8.4 10,-8.4 z m -924.3,-8 5.1,4 h 5 l 1.4,4 7.2,4.4 -8.6,4 -3.6,-8.4 H 211 Z m 1039.3,-8 -5,3.6 -8,-3.6 6,-3.2 z m -931.3,-86.4 0.8,5.6 3.6,-4.4 4.3,5.2 6.5,-2.4 2.8,1.6 0.8,2.8 2.8,2.8 11.6,-2.8 9.3,4.4 10.1,-0.8 4.3,2.8 7.9,-4.8 14.4,5.6 27.6,135.2 8.4,4 4.4,-4 0.8,4 14.4,8 0.8,4 5.6,-4 1.6,-8 4.8,-4 h 4.4 l 1.6,4 v 4 l 14.4,8 15.6,16 6,4 10,4 h 9.2 l -0.8,4 4.4,8 -2.8,8 -4.4,-4 -4.4,4 -4.8,-8 h -2.8 l 1.2,4 4.4,8 -4.4,4 h -2 l -11.6,-8 v -8 l -3.6,-4 -0.8,8 h -4.4 v -8 l -2,-4 -0.8,4 h -4.8 l -16,-16 -2.8,-8 -28.8,-12 1.2,-4 h 0.8 -3.6 l -2,4 -9.6,-4 h -11.2 l -10.4,8 1.6,-8 h -13 l -5,-8 h -9.4 -5 l 1.4,4 5,4 -1.4,4 -3.6,4 h -6.5 l -8.6,8 -7.9,4 h -4.4 l 8,-8 h -5.1 -2.9 l 4.4,-8 v -8 l 6.4,-4 2.9,4 5.1,-4 -6.5,-4 h -4.3 l -6.5,8 -5.1,8 h -2.1 v 4 l -2.9,4 h -0.7 l -2.2,4 h -2.9 l -0.7,8 h 4.3 l -3.6,8 -2.8,4 -5.8,4 -2.2,4 h -2.8 l -2.9,4 h -2.9 l -1.4,4 -4.4,4 h -3.6 l -1.4,4 h -5 l -2.2,4 -3.6,4 -4.3,4 h -5.8 -3.6 -0.7 l -5,4 -2.2,-4 h -2.2 l -2.1,4 -2.9,4 h -4.3 -4.4 l -3.6,4 h -5.7 l -8.7,4 -0.7,-4 4.3,-8 h 10.8 5.1 l 9.3,-8 h 7.2 2.2 l 2.2,-4 5.7,-4 8.7,-4 h 2.8 l 2.9,-8 5.1,-4 h 0.7 l 2.2,-12 4.3,-8 -9.4,4 -2.9,-4 -2.8,8 -4.4,-8 h -3.6 l -2.8,-4 -5.1,4 h -3.6 l -2.9,4 -2.8,-4 h 2.1 l -0.7,-8 3.6,-4 -3.6,-8 -6.5,4 -6.5,-4 -6.5,-8 -1.4,-4 2.2,-4 h -1.5 l -2.1,-4 -0.8,-4 -2.1,-4 2.9,-4 2.1,-4 6.5,-4 2.9,-8 h 2.9 5 l 1.5,4 5.7,-4 7.2,-4 h 5.1 l -0.8,-8.4 -3.6,-4 5.1,-4 -0.8,-4 -4.3,0.8 -4.3,2.8 -3.6,4.4 -1.4,-4 -5.1,-0.4 h -7.9 l -7.9,-4 -1.5,-6.8 3.6,-3.6 -10,-5.6 18.7,-8.8 8.6,-1.2 v 6.4 l 11.5,4.4 3.6,-5.2 -1.4,-6.4 2.9,-2.8 -13.7,-3.6 -1.4,-8.8 -12.3,-12 2.9,-2.4 0.7,-5.6 h 13 l 11.5,-16.8 5.8,-0.4 10,-6.8 h 5.8 l 7.9,-7.2 z m -33.1,-155.6 6.5,10.8 -4.3,-2.4 z m -28.8,-52.8 v 4.4 l -5,-2 -0.7,-3.6 z m -9.3,2.8 -5.1,0.8 -2.9,-5.6 5.8,0.8 z m 1549.5,-27.2 1,2 h -3 l -4,3.2 2,-1.6 2,-2.8 z m -4,-233.2 -4,2.8 1,-2.8 v -1.6 -1.2 l 3,-1.6 z m 106,-62.8 -12,3.6 2,-0.8 4,-7.2 z m 15,0.8 -3,0.8 -4,-0.8 4,-1.6 1,-3.6 3,3.2 z m -451,-116 -9,3.6 -3,-1.2 6,-4.4 2,-2.4 z m -170,-64.8 -4,3.6 -4,-1.2 2,-3.2 8,-4 10,-7.2 v 3.6 l -3,3.6 z M 333.4,81.76 v 3.6 l -6.5,-5.2 1.5,-4.8 -3.6,-4.4 5,-1.6 -0.7,10 z m -11.5,-25.2 h -4.3 l -0.8,-4.4 h 3.7 z m 8.6,-3.6 -2.9,2 -5,-2.8 3.6,-2 z m 80,7.2 32.4,8 17.2,4 21.6,5.2 10.8,2.8 28,6 36.8,7.6 18.8,3.6 29.6,6.04 22.8,3.6 26,4.4 15.2,2.8 35.2,4.8 36,5.2 29.6,3.6 30.8,3.6 29.6,2.8 28.8,2.4 31.6,2.8 26.8,1.6 14.4,1.2 38,1.6 18.8,0.8 14.7,0.4 30,0.8 21,0.8 h 24 31 5 l -1,-16.8 6,0.8 3,2.8 5,17.6 v 4.4 l 2,2.8 6,0.8 4,2 12,0.8 2,4.4 9,-1.6 V 163 l 8,-2.8 3,0.8 h 2 l 8,3.6 3,4.4 4,-0.8 4,9.2 3,-0.4 v -4.4 l 3,-1.6 5,2.4 -1,2 7,2 3,3.6 8,3.2 5,-2.4 6,-4.4 4,-2.8 4,6 h 11 l 7,-1.6 4,0.8 3,4.4 5,-2.4 3,1.6 -4,4.4 -5,2.8 -17,6.4 -5,3.6 -8,7.2 -12,15.2 -4,2 -6,6.4 -8,7.2 2,3.2 7,0.4 7,-2.8 13,-5.6 7,-4.4 3,2.8 -4,6 v 7.2 l 6,-3.6 5,3.6 h 4 l 11,-5.2 4,-4.4 3,-2 10,-2.4 6,-2.8 2,-3.6 6,-2 2,-3.6 10,-8.8 2,-3.6 7,-4.4 11,-1.2 v 3.6 l -6,4.4 -6,4 -5,12.4 1,5.6 5,-6.4 6,0.8 h 4 l 7,2 6,8 6,6 6,-0.8 4,-1.6 5,2.8 6,0.8 2,-3.6 11,-8.4 8,-2.4 11,-0.8 7,-3.6 8,-1.2 -1,10.8 1,1.2 h 8 l 4,-1.2 3,2 3,-3.6 9,-1.2 -1,3.6 2,10 8,8.4 h -6 -4 l -6,2.4 V 253 l -7,-1.2 -4,8.4 -6,-4.8 -10,-2.8 -6,0.4 -3,5.2 -7,1.6 -1,2 -8,-0.8 -4,2.8 -1,5.2 -2,1.6 -3,0.4 -2,6 -2,-1.6 4,-8.4 h -7 l -2,6.4 -3,2 -3,-1.2 -5,7.6 -5,12.4 -4,5.6 v 2.4 l -1,4.8 -3,0.8 -4,6.4 -2,6.8 -1,5.6 3,0.8 5,-6 v -1.2 l 4,Line truncated
<path
id="boundaries"
style="display:inline;fill:none;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 1795,420.5 6,-5.3 m -5,5.8 5,-5.8 m -875.2,613.8 -3.6,-10 h -2.4 l -1.2,-8 -3.6,-4 -0.8,-7 -4.4,-6.6 -7.2,-5.6 -2,-4.4 -3.6,-0.8 -6,-4.8 0.8,-3.2 -4.8,-4.8 -4.4,-2.4 -2.8,2.4 -4.4,-1.6 -8,-2 -3.6,0.8 -9.2,-4.4 -3.6,4.8 -3.2,-1.2 -7.2,2 -2.8,5.2 -2,3.6 -2.4,6.4 -12.8,15.6 -9.2,-3.2 -5.2,-6 -5.6,-1.2 -3.2,-3.6 -7.6,-3.2 -6,-4 -0.8,-3.6 -4.8,-2.4 -6,-5.6 -0.4,-4.4 -4.4,-7.2 -0.8,-6.4 1.6,-5.2 -4.4,-8.4 -1.6,-1.6 -0.8,-8 -2.8,-2 -8,-8.8 -6.4,-2.8 v -2 l -4.8,-4.4 -1.6,-4.4 -5.6,-3.6 -3.2,-5.6 -4,-5.2 -3.2,-0.8 -4.8,-3.6 -4.4,-11.6 -5.2,-2.8 -28,-3.6 -32.4,-3.6 -2.8,18.8 -30.4,-3.6 -51.2,-8 -22,-2.8 L 530.2,859 501,841.4 464.2,820.6 433.9,801.8 415.2,791 l 1.4,-4.8 4.3,-3.6 -50.4,-6.4 -36.7,-4.4 v -6 l -2.9,-2 2.2,-7.2 -0.8,-10.8 -3.6,-10 -2.8,-3.6 -5.1,-8 -4.3,-3.6 -5,-7.2 H 305 l -4.3,-4.4 2.1,-2 -0.7,-5.2 -3.6,-4.8 h -8.6 l -4.4,-3.2 -7.9,-7.2 -0.7,-4.8 -5.8,-6.4 -2.8,-2.4 -10.8,-2.8 -3.6,-2.8 -9.4,-2.8 -6.5,-0.8 -0.7,-3.6 -3.6,-3.6 2.9,-5.2 1.4,-11.6 1.5,-6.4 -7.2,-7.2 2.8,-6.4 -4.3,-3.6 -2.9,-8.8 -2.8,-2 -1.5,-5.6 -2.9,-5.2 V 589 l -2.1,-1.6 -2.9,-8 -2.9,-2.8 -1.4,-11.6 2.1,-6.4 4.4,0.8 2.1,-8 -2.1,-6.4 h -5.1 l -4.3,-5.2 -0.7,-3.6 -2.9,-4.8 2.2,-6.8 -0.8,-6.4 -1.4,-1.2 2.9,-8 0.7,-2.8 3.6,-0.8 -0.7,4.8 -0.7,5.2 3.6,1.6 2.8,5.6 2.9,0.8 -2.1,-2.4 0.7,-7.2 -4.3,-7.2 1.4,-3.6 -2.2,-4 5.8,-2.4 -2.9,-4.8 -3.6,0.4 -3.6,12.4 -5.7,-5.2 -2.9,-5.6 -2.9,-2 0.7,-6 v -5.6 l -2.1,-8 -5.1,-7.2 -3.6,-10 -2.9,-3.6 -1.4,-6 2.9,-3.6 -0.7,-13.6 4.3,-7.9 0.7,-12.3 -2.9,-8.6 -1.4,-5 -2.2,-2.2 -3.6,-6.5 0.7,-7.9 4.4,-6.5 8.6,-9.3 3.6,-5.8 -0.7,-2.2 3.6,-6.4 3.6,-9.4 0.7,-12.2 -2.2,-2.2 4.4,-8.6 -2.9,-6.5 v -5.8 l 1.4,-7.9 2.9,-5.8 0.7,-3.6 -2.1,-8.6 3.6,-3.6 7.2,-12.2 5,-6.5 4.3,-6.5 4.3,-9.4 6.5,-16.6 6.5,-15.8 1.4,-5.8 5.1,-9.3 2.1,-3.6 8.7,-24.5 -0.7,-2.2 5,-11.5 3.6,-2.9 9.4,-1.4 -4.4,-2.9 -5,0.7 -2.2,-3.6 1.5,-6.4 3.6,-0.8 -0.7,-9.3 -1.5,-4.3 0.7,-2.9 4.4,-1.5 v -4.3 l -3.6,-0.7 0.7,-11.52 -1.5,-5.76 1.5,-5.76 V 76.8 l -2.9,-7.2 -0.7,-5.04 0.7,-7.2 4.3,-6.48 2.9,-0.72 4.3,5.04 3.6,2.16 4.3,5.04 9.4,3.6 7.2,4.32 5,1.44 2.9,-1.44 2.2,4.32 2.9,2.16 5,-2.16 2.2,2.16 -1.5,10.08 -7.2,2.16 -2.9,5.04 -2.8,0.72 -2.2,2.88 4.3,-2.88 5.1,-0.72 3.6,-5.04 5.7,-2.88 -0.7,7.2 -2.9,9.34 -2.9,3.6 -2.8,6.5 -5.1,-3.6 v -2.9 l -2.9,2.9 -0.7,4.3 3.6,4.3 6.5,-5.7 4.3,-0.7 2.9,-2.2 v -8.6 l 2.9,-7.96 4.3,-6.48 3.6,-2.16 -2.9,-4.32 V 73.92 73.2 l 1.5,-2.16 -6.5,-6.48 2.9,-4.32 2.8,3.6 1.5,-7.2 1.4,-4.32 -5,-4.32 -1.5,-3.6 2.2,-5.04 27.4,8.64 25.2,6.48 23.8,5.76 m 0,0 32.5,8.64 17.2,4.32 21.6,5.04 10.8,2.16 27.2,5.76 37.6,7.92 18.8,3.6 29.2,5.72 23.2,4.4 26,4.3 15.2,2.1 35.2,5.1 35.2,5 30.4,3.6 30,3.6 30.4,2.9 28.8,2.9 31.6,2.1 26,2.2 15.2,0.7 37.2,2.2 18.8,0.7 h 15 l 31,0.7 20,0.7 h 23 31 5 v -16.5 l 6,0.7 4,3.6 4,17.3 -1,4.3 4,2.2 4,0.7 6,2.1 12,0.8 1,5 9,-1.4 v -2.2 l 8,-2.2 h 3 3 l 7,3.6 2,4.4 5,-0.8 4,9.4 3,-0.7 -1,-4.3 4,-0.8 5,1.5 v 2.1 l 5,2.9 4,3.6 8,2.2 5,-2.2 6,-4.3 4,-2.9 4,6.5 11,-0.7 8,-1.5 2,1.5 5,3.6 4,-1.5 4,0.8 -5,4.3 -6,3.6 -15,5.7 -6,3.6 -8,8 -12,14.4 -4,2.1 -5,6.5 -9,7.2 2,2.9 7,0.7 7,-2.8 13,-5.1 7,-5 3,2.9 -3,5.7 -2,7.9 7,-4.3 5,3.6 4,0.7 11,-5.7 4,-4.3 2,-2.2 12,-2.2 5,-2.8 2,-3.7 7,-2.1 v -2.9 l 11,-9.4 2,-3.6 7,-4.3 11,-1.4 v 3.6 l -7,4.3 -4,5 -6,11.5 1,5.8 5,-5.8 h 6 4 l 7,2.2 6,8 6,5.7 6,-0.7 4,-1.4 5,3.6 h 6 l 2,-3.6 11,-8.7 8,-1.4 12,-0.7 6,-4.4 7,-1.4 v 10.8 l 1,1.4 7,0.8 4,-2.2 4,2.2 2,-3.6 10,-1.5 -1,4.3 1,10.1 8,7.9 h -6 -2 l -1,0.8 -6,1.4 -1,-2.2 -6,-0.7 -4,7.9 -6,-5 -10,-2.2 -6,0.8 -4,4.3 -6,1.4 -2,2.2 -7,-0.7 -4,2.8 -1,5.1 -2,1.4 -3,0.7 -3,6.5 -2,-2.1 5,-8.7 -8,0.7 -1,5.8 -3,2.2 -3,-1.5 -6,7.9 -5,12.3 -3,5.7 v 2.2 5 l -4,1.5 -4,5.7 -2,6.5 -1,5.8 3,0.7 5,-5 1,-1.5 2,-7.2 6,-2.9 4,-12.9 6,-2.2 v 5.1 l -2,1.4 -1,8.6 -3,3.6 -2,5.1 -2,7.9 -1,7.9 1,5.8 -4,3.6 -2,9.3 2,8.7 -2,6.5 -3,12.9 1,2.9 3,14.4 3,2.9 -1,5 v 7.2 8.7 l 3,5.7 3,3.6 3,9.3 3,6 6,2.8 h 4 l 9,-5.2 3,-2 6,-6.6 3,-10 4,-5.8 2,-7.9 V 398 l -1,-9.4 -2,-5 -5,-8.7 -2,-6.5 -3,-5.7 2,-9.4 -4,-9.3 4,-5.8 3,-7.9 v -7.2 l -1,-7.9 4,-3.6 v -5.8 l 4,-2.9 h 3 l 2,-4.3 5,-1.4 v 12.9 l 3,0.7 2,-5 2,-2.9 V 295 l -2,-4.3 1,-2.9 4,-4.3 3,-0.7 -2,-8 5,-7.2 6,-3.6 9,4.4 4,-0.8 4,1.5 3,4.3 h 6 l 2,2.2 14,4.3 1,3.6 3,2.9 -4,5 2,4.3 3,2.2 3,6.5 -1,8.6 1,7.2 -5,3.6 -1,5 -3,8 -4,0.7 -2,3.6 -1,6.5 2,3.6 7,2.8 6,-7.2 2,-5 3,-6.5 6,-1.4 4,-3.6 6,2.1 5,6.5 1,5.8 3,10.8 3,11.5 5,7.2 -2,2.9 1,6.5 -1,7.2 -4,2.1 -2,-5 -3,2.9 -1,7.9 v 5 l -5,2.2 -1,3.6 v 6.5 l -2,2.1 -6,10.8 v 3.6 l 10,2.9 6,3.6 -1,2.8 4,0.8 7,-2 7,2.8 4,-2.8 3,-0.8 7,-4.4 h 2 7 l 7,-7.9 5,-6.5 9,-5 14,-8 5,-3.6 17,-12.9 9,-7.9 2,-4.4 6,-3.6 2,-5.7 4,-4.3 V 362 l -7,-8.7 -2,-7.2 13,-7.2 4,-1.4 15,-2.2 7,-0.7 6,2.9 6,-2.2 8,-2.1 h 5 l 7,-5.1 3,-3.6 5,-5.7 h 3 l 3,-3.6 -1,-4.4 -3,-5.7 3,-5.1 -5,-2.1 -4,-3.6 1,-4.3 3,-5.1 8,-6.5 2,-5.7 11,-16.6 9,-7.9 4,-2.9 3,0.7 20,-5 21,-5.8 4,-0.7 19,-4.3 19,-5.1 12,-3.6 1,-10.1 2,-3.6 5,1.5 1,-2.9 3,-2.9 5,2.2 -2,-5.8 6,-1.4 -3,-2.9 v -2.9 l 2,-5.7 4,-3.6 -2,-2.9 3,-4.3 1,-2.9 -3,-2.9 1,-5.8 -2,-1.4 v -6.5 l 4,-4.3 -1,-7.2 v -5 l 13,-37.5 h 5 l 2,7.2 5,1.5 8,-7.2 6,-1.5 v -3.6Line truncated
<g
id="labels">
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;line-height:1.25;font-family:Arial;-inkscape-font-specification:Arial;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"
x="968"
y="922.3"
id="text902"><tspan
id="tspan900"
x="968"
y="922.3"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;font-family:Arial;-inkscape-font-specification:Arial">TX</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;line-height:1.25;font-family:Arial;-inkscape-font-specification:Arial;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"
x="1717"
y="342"
id="text902-2"><tspan
id="tspan900-3"
x="1717"
y="342"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;font-family:Arial;-inkscape-font-specification:Arial">NY</tspan></text>
<text
id="text4494"
y="740.1"
x="516.6"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;line-height:1.25;font-family:Arial;-inkscape-font-specification:Arial;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;font-family:Arial;-inkscape-font-specification:Arial"
y="740.1"
x="516.6"
id="tspan4492">AZ</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;line-height:1.25;font-family:Arial;-inkscape-font-specification:Arial;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"
x="264.6"
y="580.1"
id="text4498"><tspan
id="tspan4496"
x="264.6"
y="580.1"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;font-family:Arial;-inkscape-font-specification:Arial">CA</tspan></text>
<text
id="text4502"
y="492.1"
x="386.6"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;line-height:1.25;font-family:Arial;-inkscape-font-specification:Arial;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;font-family:Arial;-inkscape-font-specification:Arial"
y="492.1"
x="386.6"
id="tspan4500">NV</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;line-height:1.25;font-family:Arial;-inkscape-font-specification:Arial;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"
x="556.6"
y="536.1"
id="text4506"><tspan
id="tspan4504"
x="556.6"
y="536.1"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;font-family:Arial;-inkscape-font-specification:Arial">UT</tspan></text>
<text
id="text4510"
y="570.1"
x="744.6"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;line-height:1.25;font-family:Arial;-inkscape-font-specification:Arial;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;font-family:Arial;-inkscape-font-specification:Arial"
y="570.1"
x="744.6"
id="tspan4508">CO</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;line-height:1.25;font-family:Arial;-inkscape-font-specification:Arial;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"
x="710.6"
y="756.1"
id="text4514"><tspan
id="tspan4512"
x="710.6"
y="756.1"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;font-family:Arial;-inkscape-font-specification:Arial">NM</tspan></text>
<text
id="text4518"
y="1000"
x="322.6"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;line-height:1.25;font-family:Arial;-inkscape-font-specification:Arial;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;font-family:Arial;-inkscape-font-specification:Arial"
y="1000"
x="322.6"
id="tspan4516">AK</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;line-height:1.25;font-family:Arial;-inkscape-font-specification:Arial;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"
x="662.6"
y="1126"
id="text4522"><tspan
id="tspan4520"
x="662.6"
y="1126"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;font-family:Arial;-inkscape-font-specification:Arial">HI</tspan></text>
<text
id="text4526"
y="740"
x="1027"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;line-height:1.25;font-family:Arial;-inkscape-font-specification:Arial;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;font-family:Arial;-inkscape-font-specification:Arial"
y="740"
x="1027"
id="tspan4524">OK</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;line-height:1.25;font-family:Arial;-inkscape-font-specification:Arial;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"
x="989"
y="606"
id="text4530"><tspan
id="tspan4528"
x="989"
y="606"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;font-family:Arial;-inkscape-font-specification:Arial">KS</tspan></text>
<text
id="text4534"
y="474"
x="955"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;line-height:1.25;font-family:Arial;-inkscape-font-specification:Arial;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;font-family:Arial;-inkscape-font-specification:Arial"
y="474"
x="955"
id="tspan4532">NE</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;line-height:1.25;font-family:Arial;-inkscape-font-specification:Arial;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"
x="935"
y="346"
id="text4538"><tspan
id="tspan4536"
x="935"
y="346"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;font-family:Arial;-inkscape-font-specification:Arial">SD</tspan></text>
<text
id="text4542"
y="386"
x="699"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;line-height:1.25;font-family:Arial;-inkscape-font-specification:Arial;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;font-family:Arial;-inkscape-font-specification:Arial"
y="386"
x="699"
id="tspan4540">WY</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;line-height:1.25;font-family:Arial;-inkscape-font-specification:Arial;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"
x="509"
y="326"
id="text4546"><tspan
id="tspan4544"
x="509"
y="326"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;font-family:Arial;-inkscape-font-specification:Arial">ID</tspan></text>
<text
id="text4550"
y="276"
x="315"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;line-height:1.25;font-family:Arial;-inkscape-font-specification:Arial;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;font-family:Arial;-inkscape-font-specification:Arial"
y="276"
x="315"
id="tspan4548">OR</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;line-height:1.25;font-family:Arial;-inkscape-font-specification:Arial;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"
x="355"
y="138"
id="text4554"><tspan
id="tspan4552"
x="355"
y="138"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;font-family:Arial;-inkscape-font-specification:Arial">WA</tspan></text>
<text
id="text4558"
y="210"
x="669"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;line-height:1.25;font-family:Arial;-inkscape-font-specification:Arial;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;font-family:Arial;-inkscape-font-specification:Arial"
y="210"
x="669"
id="tspan4556">MT</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;line-height:1.25;font-family:Arial;-inkscape-font-specification:Arial;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"
x="937"
y="218"
id="text4562"><tspan
id="tspan4560"
x="937"
y="218"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;font-family:Arial;-inkscape-font-specification:Arial">ND</tspan></text>
<text
id="text4566"
y="272"
x="1111"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;line-height:1.25;font-family:Arial;-inkscape-font-specification:Arial;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;font-family:Arial;-inkscape-font-specification:Arial"
y="272"
x="1111"
id="tspan4564">MN</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;line-height:1.25;font-family:Arial;-inkscape-font-specification:Arial;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"
x="1263"
y="338"
id="text4570"><tspan
id="tspan4568"
x="1263"
y="338"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;font-family:Arial;-inkscape-font-specification:Arial">WI</tspan></text>
<text
id="text4574"
y="452"
x="1155"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;line-height:1.25;font-family:Arial;-inkscape-font-specification:Arial;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;font-family:Arial;-inkscape-font-specification:Arial"
y="452"
x="1155"
id="tspan4572">IA</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;line-height:1.25;font-family:Arial;-inkscape-font-specification:Arial;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"
x="1297"
y="528"
id="text4578"><tspan
id="tspan4576"
x="1297"
y="528"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;font-family:Arial;-inkscape-font-specification:Arial">IL</tspan></text>
<text
id="text4582"
y="610"
x="1181"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;line-height:1.25;font-family:Arial;-inkscape-font-specification:Arial;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;font-family:Arial;-inkscape-font-specification:Arial"
y="610"
x="1181"
id="tspan4580">MO</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;line-height:1.25;font-family:Arial;-inkscape-font-specification:Arial;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"
x="1191"
y="766"
id="text4586"><tspan
id="tspan4584"
x="1191"
y="766"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;font-family:Arial;-inkscape-font-specification:Arial">AR</tspan></text>
<text
id="text4590"
y="924"
x="1199"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;line-height:1.25;font-family:Arial;-inkscape-font-specification:Arial;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;font-family:Arial;-inkscape-font-specification:Arial"
y="924"
x="1199"
id="tspan4588">LA</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;line-height:1.25;font-family:Arial;-inkscape-font-specification:Arial;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"
x="1295"
y="846"
id="text4594"><tspan
id="tspan4592"
x="1295"
y="846"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;font-family:Arial;-inkscape-font-specification:Arial">MS</tspan></text>
<text
id="text4598"
y="836"
x="1403"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;line-height:1.25;font-family:Arial;-inkscape-font-specification:Arial;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;font-family:Arial;-inkscape-font-specification:Arial"
y="836"
x="1403"
id="tspan4596">AL</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;line-height:1.25;font-family:Arial;-inkscape-font-specification:Arial;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"
x="1519"
y="828"
id="text4602"><tspan
id="tspan4600"
x="1519"
y="828"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;font-family:Arial;-inkscape-font-specification:Arial">GA</tspan></text>
<text
id="text4606"
y="1020"
x="1621"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;line-height:1.25;font-family:Arial;-inkscape-font-specification:Arial;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;font-family:Arial;-inkscape-font-specification:Arial"
y="1020"
x="1621"
id="tspan4604">FL</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;line-height:1.25;font-family:Arial;-inkscape-font-specification:Arial;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"
x="1611"
y="768"
id="text4610"><tspan
id="tspan4608"
x="1611"
y="768"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;font-family:Arial;-inkscape-font-specification:Arial">SC</tspan></text>
<text
id="text4614"
y="684"
x="1663"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;line-height:1.25;font-family:Arial;-inkscape-font-specification:Arial;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;font-family:Arial;-inkscape-font-specification:Arial"
y="684"
x="1663"
id="tspan4612">NC</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;line-height:1.25;font-family:Arial;-inkscape-font-specification:Arial;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"
x="1405"
y="708"
id="text4618"><tspan
id="tspan4616"
x="1405"
y="708"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;font-family:Arial;-inkscape-font-specification:Arial">TN</tspan></text>
<text
id="text4622"
y="624"
x="1447"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;line-height:1.25;font-family:Arial;-inkscape-font-specification:Arial;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;font-family:Arial;-inkscape-font-specification:Arial"
y="624"
x="1447"
id="tspan4620">KY</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;line-height:1.25;font-family:Arial;-inkscape-font-specification:Arial;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"
x="1395"
y="524"
id="text4626"><tspan
id="tspan4624"
x="1395"
y="524"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;font-family:Arial;-inkscape-font-specification:Arial">IN</tspan></text>
<text
id="text4630"
y="376"
x="1417"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;line-height:1.25;font-family:Arial;-inkscape-font-specification:Arial;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;font-family:Arial;-inkscape-font-specification:Arial"
y="376"
x="1417"
id="tspan4628">MI</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;line-height:1.25;font-family:Arial;-inkscape-font-specification:Arial;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"
x="1497"
y="500"
id="text4634"><tspan
id="tspan4632"
x="1497"
y="500"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;font-family:Arial;-inkscape-font-specification:Arial">OH</tspan></text>
<text
id="text4638"
y="568"
x="1569"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;line-height:1.25;font-family:Arial;-inkscape-font-specification:Arial;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;font-family:Arial;-inkscape-font-specification:Arial"
y="568"
x="1569"
id="tspan4636">WV</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;line-height:1.25;font-family:Arial;-inkscape-font-specification:Arial;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"
x="1655"
y="594"
id="text4642"><tspan
id="tspan4640"
x="1655"
y="594"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;font-family:Arial;-inkscape-font-specification:Arial">VA</tspan></text>
<text
id="text4646"
y="446"
x="1661"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;line-height:1.25;font-family:Arial;-inkscape-font-specification:Arial;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;font-family:Arial;-inkscape-font-specification:Arial"
y="446"
x="1661"
id="tspan4644">PA</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;line-height:1.25;font-family:Arial;-inkscape-font-specification:Arial;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"
x="1871"
y="198"
id="text4650"><tspan
id="tspan4648"
x="1871"
y="198"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;font-family:Arial;-inkscape-font-specification:Arial">ME</tspan></text>
<text
id="text4654"
y="190"
x="1719"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;line-height:1.25;font-family:Arial;-inkscape-font-specification:Arial;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;font-family:Arial;-inkscape-font-specification:Arial"
y="190"
x="1719"
id="tspan4652">VT</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;line-height:1.25;font-family:Arial;-inkscape-font-specification:Arial;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"
x="1780"
y="173"
id="text4658"><tspan
id="tspan4656"
x="1780"
y="173"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;font-family:Arial;-inkscape-font-specification:Arial">NH</tspan></text>
<text
id="text4662"
y="313"
x="1902"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;line-height:1.25;font-family:Arial;-inkscape-font-specification:Arial;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;font-family:Arial;-inkscape-font-specification:Arial"
y="313"
x="1902"
id="tspan4660">MA</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;line-height:1.25;font-family:Arial;-inkscape-font-specification:Arial;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"
x="1909"
y="400"
id="text4666"><tspan
id="tspan4664"
x="1909"
y="400"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;font-family:Arial;-inkscape-font-specification:Arial">RI</tspan></text>
<text
id="text4670"
y="427"
x="1863"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;line-height:1.25;font-family:Arial;-inkscape-font-specification:Arial;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;font-family:Arial;-inkscape-font-specification:Arial"
y="427"
x="1863"
id="tspan4668">CT</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;line-height:1.25;font-family:Arial;-inkscape-font-specification:Arial;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"
x="1820"
y="468"
id="text4674"><tspan
id="tspan4672"
x="1820"
y="468"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;font-family:Arial;-inkscape-font-specification:Arial">NJ</tspan></text>
<text
id="text4678"
y="519"
x="1809"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;line-height:1.25;font-family:Arial;-inkscape-font-specification:Arial;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;font-family:Arial;-inkscape-font-specification:Arial"
y="519"
x="1809"
id="tspan4676">DE</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;line-height:1.25;font-family:Arial;-inkscape-font-specification:Arial;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"
x="1806"
y="573"
id="text4682"><tspan
id="tspan4680"
x="1806"
y="573"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.3333px;font-family:Arial;-inkscape-font-specification:Arial">MD</tspan></text>
</g>
<path id="lines"
style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none"
d="m 1803,184.5 36,90.2 m -88,-72.6 42,42.6 m 100,64.6 -41,19.4 m 47,47.2 -41,-21.3 m 7,39.7 -39,-24.9 m -29,186.4 -83,-54.6 m 86,9.1 -29,5.4 m 15,-62.5 25,3.5" />
</svg>

After

Width:  |  Height:  |  Size: 89 KiB

+27
View File
@@ -0,0 +1,27 @@
# State/capital verification
`states.tsv` is the canonical 50-row alphabetical dataset. Postal code, full
state name, and capital travel together into `src/states.c`. Geography span
index N is always TSV row N; no second alphabetical ordering is introduced.
Alaska = Juneau; Hawaii = Honolulu. DC and territories are excluded.
Checked 2026-11-09 against both full lists:
- <https://www.50states.com/tools/thelist.htm>
- <https://factsinstitute.com/countries/state-capitals/>
Minnesota is displayed as **Saint Paul**. Normalization also accepts **St. Paul**
and **St Paul**, in any case and with repeated or surrounding whitespace.
`map-seeds.json` documents source SVG interior coordinates, replacing outside
callout-label positions for small Northeast states. The conversion asserts
that each seed is land and is in a distinct connected state region. Detached
land is assigned to its nearest identified region, with explicit geographic rules for the
Alaska/Hawaii inset islands and Michigan's Upper Peninsula. Geometry is a simplified educational
map, not a survey or political boundary authority.
`map-manifest.json` records source region sizes, per-view dimensions, source
crop bounds and per-state pixel coverage. `tests/check_assets.py` checks all
50 identity slots, disjoint span coverage, bounds, and small-state/inset
presence. `tools/prepare_assets.py` reproduces all generated C and previews
using only Python's standard library; no SVG is parsed by the CoCo program.
+249
View File
@@ -0,0 +1,249 @@
{
"national": {
"size": [
200,
110
],
"source_box": [
0,
0,
2000,
1200
],
"pixels": {
"AL": 155,
"AK": 266,
"AZ": 374,
"AR": 160,
"CA": 516,
"CO": 327,
"CT": 18,
"DE": 7,
"FL": 204,
"GA": 180,
"HI": 20,
"ID": 251,
"IL": 173,
"IN": 105,
"IA": 172,
"KS": 256,
"KY": 109,
"LA": 150,
"ME": 111,
"MD": 22,
"MA": 21,
"MI": 177,
"MN": 265,
"MS": 143,
"MO": 205,
"MT": 473,
"NE": 236,
"NV": 350,
"NH": 19,
"NJ": 23,
"NM": 395,
"NY": 134,
"NC": 156,
"ND": 219,
"OH": 124,
"OK": 204,
"OR": 303,
"PA": 138,
"RI": 3,
"SC": 94,
"SD": 243,
"TN": 121,
"TX": 913,
"UT": 263,
"VT": 22,
"VA": 113,
"WA": 210,
"WV": 67,
"WI": 183,
"WY": 308
},
"bytes": 2676
},
"northeast": {
"size": [
100,
100
],
"source_box": [
1540,
120,
1980,
600
],
"pixels": {
"AL": 0,
"AK": 0,
"AZ": 0,
"AR": 0,
"CA": 0,
"CO": 0,
"CT": 92,
"DE": 28,
"FL": 0,
"GA": 0,
"HI": 0,
"ID": 0,
"IL": 0,
"IN": 0,
"IA": 0,
"KS": 0,
"KY": 3,
"LA": 0,
"ME": 551,
"MD": 148,
"MA": 128,
"MI": 0,
"MN": 0,
"MS": 0,
"MO": 0,
"MT": 0,
"NE": 0,
"NV": 0,
"NH": 137,
"NJ": 134,
"NM": 0,
"NY": 813,
"NC": 0,
"ND": 0,
"OH": 221,
"OK": 0,
"OR": 0,
"PA": 774,
"RI": 14,
"SC": 0,
"SD": 0,
"TN": 0,
"TX": 0,
"UT": 0,
"VT": 149,
"VA": 395,
"WA": 0,
"WV": 383,
"WI": 0,
"WY": 0
},
"bytes": 1128
},
"hawaii": {
"size": [
100,
82
],
"source_box": [
565,
995,
785,
1185
],
"pixels": {
"AL": 0,
"AK": 0,
"AZ": 0,
"AR": 0,
"CA": 0,
"CO": 0,
"CT": 0,
"DE": 0,
"FL": 0,
"GA": 0,
"HI": 474,
"ID": 0,
"IL": 0,
"IN": 0,
"IA": 0,
"KS": 0,
"KY": 0,
"LA": 0,
"ME": 0,
"MD": 0,
"MA": 0,
"MI": 0,
"MN": 0,
"MS": 0,
"MO": 0,
"MT": 0,
"NE": 0,
"NV": 0,
"NH": 0,
"NJ": 0,
"NM": 0,
"NY": 0,
"NC": 0,
"ND": 0,
"OH": 0,
"OK": 0,
"OR": 0,
"PA": 0,
"RI": 0,
"SC": 0,
"SD": 0,
"TN": 0,
"TX": 0,
"UT": 0,
"VT": 0,
"VA": 0,
"WA": 0,
"WV": 0,
"WI": 0,
"WY": 0
},
"bytes": 276
},
"source_component_pixels": {
"TX": 99510,
"NY": 17088,
"AZ": 42572,
"CA": 58649,
"NV": 41220,
"UT": 31555,
"CO": 38944,
"NM": 45545,
"AK": 23435,
"HI": 1239,
"OK": 25671,
"KS": 30684,
"NE": 28657,
"SD": 28575,
"WY": 36519,
"ID": 30691,
"OR": 36095,
"WA": 24459,
"MT": 55176,
"ND": 26235,
"MN": 31079,
"WI": 20411,
"IA": 20753,
"IL": 20647,
"MO": 25757,
"AR": 19475,
"LA": 16798,
"MS": 17411,
"AL": 18924,
"GA": 21645,
"FL": 20584,
"SC": 11222,
"NC": 17586,
"TN": 15180,
"KY": 14470,
"IN": 13097,
"MI": 14854,
"OH": 14990,
"WV": 8390,
"VA": 13925,
"PA": 16573,
"ME": 11502,
"VT": 3240,
"NH": 3064,
"MA": 2498,
"RI": 227,
"CT": 1599,
"NJ": 2543,
"DE": 517,
"MD": 2607
}
}
+202
View File
@@ -0,0 +1,202 @@
{
"TX": [
983,
910
],
"NY": [
1732,
330
],
"AZ": [
532,
728
],
"CA": [
280,
568
],
"NV": [
402,
480
],
"UT": [
572,
524
],
"CO": [
760,
558
],
"NM": [
726,
744
],
"AK": [
338,
988
],
"HI": [
739,
1130
],
"OK": [
1042,
728
],
"KS": [
1004,
594
],
"NE": [
970,
462
],
"SD": [
950,
334
],
"WY": [
714,
374
],
"ID": [
524,
314
],
"OR": [
330,
264
],
"WA": [
370,
126
],
"MT": [
684,
198
],
"ND": [
952,
206
],
"MN": [
1126,
260
],
"WI": [
1278,
326
],
"IA": [
1170,
440
],
"IL": [
1312,
516
],
"MO": [
1196,
598
],
"AR": [
1206,
754
],
"LA": [
1214,
912
],
"MS": [
1310,
834
],
"AL": [
1418,
824
],
"GA": [
1534,
816
],
"FL": [
1636,
1008
],
"SC": [
1626,
756
],
"NC": [
1678,
672
],
"TN": [
1420,
696
],
"KY": [
1462,
612
],
"IN": [
1410,
512
],
"MI": [
1432,
364
],
"OH": [
1512,
488
],
"WV": [
1584,
556
],
"VA": [
1670,
582
],
"PA": [
1676,
434
],
"ME": [
1886,
186
],
"VT": [
1800,
280
],
"NH": [
1840,
280
],
"MA": [
1830,
340
],
"RI": [
1860,
360
],
"CT": [
1830,
375
],
"NJ": [
1780,
440
],
"DE": [
1764,
509
],
"MD": [
1720,
536
]
}
+50
View File
@@ -0,0 +1,50 @@
AL Alabama Montgomery
AK Alaska Juneau
AZ Arizona Phoenix
AR Arkansas Little Rock
CA California Sacramento
CO Colorado Denver
CT Connecticut Hartford
DE Delaware Dover
FL Florida Tallahassee
GA Georgia Atlanta
HI Hawaii Honolulu
ID Idaho Boise
IL Illinois Springfield
IN Indiana Indianapolis
IA Iowa Des Moines
KS Kansas Topeka
KY Kentucky Frankfort
LA Louisiana Baton Rouge
ME Maine Augusta
MD Maryland Annapolis
MA Massachusetts Boston
MI Michigan Lansing
MN Minnesota Saint Paul
MS Mississippi Jackson
MO Missouri Jefferson City
MT Montana Helena
NE Nebraska Lincoln
NV Nevada Carson City
NH New Hampshire Concord
NJ New Jersey Trenton
NM New Mexico Santa Fe
NY New York Albany
NC North Carolina Raleigh
ND North Dakota Bismarck
OH Ohio Columbus
OK Oklahoma Oklahoma City
OR Oregon Salem
PA Pennsylvania Harrisburg
RI Rhode Island Providence
SC South Carolina Columbia
SD South Dakota Pierre
TN Tennessee Nashville
TX Texas Austin
UT Utah Salt Lake City
VT Vermont Montpelier
VA Virginia Richmond
WA Washington Olympia
WV West Virginia Charleston
WI Wisconsin Madison
WY Wyoming Cheyenne
1 AL Alabama Montgomery
2 AK Alaska Juneau
3 AZ Arizona Phoenix
4 AR Arkansas Little Rock
5 CA California Sacramento
6 CO Colorado Denver
7 CT Connecticut Hartford
8 DE Delaware Dover
9 FL Florida Tallahassee
10 GA Georgia Atlanta
11 HI Hawaii Honolulu
12 ID Idaho Boise
13 IL Illinois Springfield
14 IN Indiana Indianapolis
15 IA Iowa Des Moines
16 KS Kansas Topeka
17 KY Kentucky Frankfort
18 LA Louisiana Baton Rouge
19 ME Maine Augusta
20 MD Maryland Annapolis
21 MA Massachusetts Boston
22 MI Michigan Lansing
23 MN Minnesota Saint Paul
24 MS Mississippi Jackson
25 MO Missouri Jefferson City
26 MT Montana Helena
27 NE Nebraska Lincoln
28 NV Nevada Carson City
29 NH New Hampshire Concord
30 NJ New Jersey Trenton
31 NM New Mexico Santa Fe
32 NY New York Albany
33 NC North Carolina Raleigh
34 ND North Dakota Bismarck
35 OH Ohio Columbus
36 OK Oklahoma Oklahoma City
37 OR Oregon Salem
38 PA Pennsylvania Harrisburg
39 RI Rhode Island Providence
40 SC South Carolina Columbia
41 SD South Dakota Pierre
42 TN Tennessee Nashville
43 TX Texas Austin
44 UT Utah Salt Lake City
45 VT Vermont Montpelier
46 VA Virginia Richmond
47 WA Washington Olympia
48 WV West Virginia Charleston
49 WI Wisconsin Madison
50 WY Wyoming Cheyenne
+43
View File
@@ -0,0 +1,43 @@
# Public VCC Plus MCP workflow
The project was connected using C Development → Assistant → Use Project
Makefile + Allow Disposable Playtests → Save Private Connection. Grants stayed
outside the checkout. `tools/vcc_mcp.py` is a normal STDIO JSON-RPC client for
`/Applications/VCC Plus.app/Contents/Helpers/vcc-mcp --grant FILE`; it does not
use a private bridge or debugger memory/register writes.
Live tools were discovered with `tools/list`, followed by `get_capabilities`.
Builds used advertised `disk` actions and `Test`/`Release` configurations.
`start_playtest` booted exact artifact disks on isolated 512 KB MC6809 workers.
Every simulated press used `playtest_input` physical-key plans with separate
release fields. `capture_playtest` supplied the actual 640×480 framebuffer.
PNG pixels were decoded at the game's 320×192 coordinates. Text was matched
against the font bytes in the corresponding linked build, so checks observed
what the guest drew, rather than trusting host quiz variables. Selected-state
pixels were also checked against each state's drawing mask.
VCC Plus protects the approved recipe and source revision. After changing
recipe/support inputs, export a fresh connection. Put captures and test logs
outside the watched project until a run finishes: adding files can advance
the project revision and end its test run. Every intended input needs a fresh
request ID; only identical retries reuse one.
## Limitations and reusable improvements
The public playtest key enum omits **period** and other punctuation. `St Paul`
and mixed-case answers were played in the guest; `St. Paul` was verified by
the shared C logic tests. A reusable improvement is to expose the remaining
physical CoCo punctuation keys (or a documented ASCII-to-key-chord input tool)
with the same field bounds and idempotency receipts.
The approved custom-Make build receipt did not advertise verified C/function
stop lists. A general pause followed by `get_debug_snapshot` returned
`verified_pause_required`. No memory was guessed or modified to work around
that refusal. Gameplay checks used framebuffer captures and ordinary inputs.
A reusable improvement is to expose the native workbench's verified C mapping
and shared globals in custom-Make artifact receipts, or document a public
manifest schema for ordinary, non-banked binaries.
These limits do not prevent building or playing the complete quiz. They limit
the automated punctuation and source-debug inspection coverage described in
TESTING.md. The user's original machine, disks and tape were preserved.
+80
View File
@@ -0,0 +1,80 @@
# Test results — 2026-11-09
Built and played with installed **VCC Plus 3.5.0, build 41**, bundled **CMOC 0.1.100**,
and the exported **public STDIO MCP interface**. All gameplay ran in disposable
**512 KB MC6809** workers. Inputs used ordinary physical guest key chords, with
release fields between presses. No guest memory or registers were modified by
a debugger. Personal emulator media and the original running machine were preserved.
## Final source validation
| Check | Result |
| --- | --- |
| Release, Debug, Test disk builds | All succeeded; no diagnostics |
| Complete multiple-choice quiz | 50 unique states, numbering 1–50, 42/50 (84%) |
| Complete typed quiz | 50 unique states, 47/50 (94%), 2 spelling corrections |
| Complete ordinary Release quiz | 50 unique states, 50/50 (100%), perfect review |
| Four distinct choices and varied correct slots | All 50 captured questions checked |
| Full state name and current-state fill | All 50 national framebuffer masks checked |
| Alaska / Hawaii / Northeast | Actual captures inspected; Hawaii island grouping corrected |
| Typed casing | Uppercase, lowercase and mixed case actually entered |
| Spaces and aliases | Multiword names, surrounding/repeated spaces, mixed-case St Paul |
| Spelling retry | Charleston and Denver transpositions: no early point/reveal; Backspace edits then correct |
| Reveal | Near Tallahassee spelling → V reveals and records a miss |
| Known wrong capital | Austin for Connecticut → incorrect, not spelling retry |
| Long input | 45 attempted X characters: bounded at 39; Enter and subsequent questions work |
| Missed review | Eight MC misses over 3 pages, three typed misses over 1 page; state, entered answer and capital checked |
| Held key | First answer held 600 fields through feedback; no accidental advance |
| Replay | P returns to mode menu; Release starts a different first-five-state order |
| Credits | Source URL, license URL and adaptation notice read from actual framebuffer |
| Exit | Title and results Quit return to BASIC with final thank-you text |
Host checks additionally passed **2,000 shuffles**, **100,000 choice sets**, all
50 exact capitals in varied casing, all **2,450** wrong-capital pairs, all
Saint Paul aliases (including **St. Paul**), edit-distance/transposition cases,
long-string bounds, one-point-per-state guarding, correction accounting and reset.
Geometry checks cover 50 unique stable IDs, disjoint bounded spans and all
national masks, plus Northeast and Hawaii detail coverage. The Hawaii detail
contains only Hawaiian state pixels. The geography converter uses explicit
inset rules for detached Hawaiian/Alaskan islands and Michigan’s Upper Peninsula.
## Reproduce and inspect
Run `make test` for host checks. For two full deterministic guest quizzes:
```sh
PYTHONDONTWRITEBYTECODE=1 python3 tests/playtest.py /private/path/grant.json \
--evidence /tmp/capital-quiz-evidence
```
The grant must enable Use Project Makefile and Allow Disposable Playtests.
The Test configuration uses seed 2709; Release uses timing/start-input entropy.
Captured PNG pixels are decoded against the font in the matching linked artifact.
Text, scores, options and selected-state fill are checked from real frames.
Full PNG captures and public receipts are in ignored `build/evidence/test/` and
`build/evidence/release/`. Compact receipts are retained in `docs/evidence/`.
The typed report’s answer field records the initial test input when a spelling
correction was subsequently made; the captured feedback and score verify the correction.
## Release artifact
- Build: `9922B526-537B-4820-BF6C-100EB8846077`
- Artifact: `B6BCF288-91C9-43D8-A460-595792BFD457`
- Release gameplay run: `4EC7FB7D-CBF8-4235-AE82-4363E57376CE`
- Binary: `e69f25c3cf8375f8fe20829d6c11a0a8cb57ceafbf10b5ccefe18c3a1773527a` (SHA-256)
- Disk: `98c5e46b17f29b10e28b818a72512cd2e8331294da223600de99589ac4e3aa68` (SHA-256)
- Executable: `build/CAPITAL.bin`; disk: `build/CAPITAL.dsk` (35 tracks, 161,280 bytes).
- Release code/static storage ends at `$7530`, below the `$7800` limit, leaving
720 bytes before the separate 2 KiB stack allowance to `$8000`.
- Map runs and offset tables total **4,080 bytes**; the public GIME helper
reserves 64 KiB of separate physical RAM for two display pages.
- Captures report **zero guest disk writes**. Test disk originals were preserved.
## Limits
No physical CoCo hardware test was performed. VCC’s public key enumeration
omits punctuation, so the dotted **St. Paul** alias was verified in the actual
shared C logic rather than typed through MCP. The custom-Make build receipt
did not advertise verified C/function stop lists, and a general pause followed
by snapshot inspection returned `verified_pause_required`; no source-debug
watch or memory inspection is claimed. These limits and reusable MCP
enhancement proposals are described in [MCP-NOTES.md](MCP-NOTES.md).
+24
View File
@@ -0,0 +1,24 @@
{
"outputs": [
{
"path": "build/CAPITAL.bin",
"bytes": 19046,
"sha256": "fcd4a9226276e04e6a82cefc3f98fb15ba5a5c250b67932dd50005cef3ec7df1"
},
{
"path": "build/CAPITAL.dsk",
"bytes": 161280,
"sha256": "309aee9234063387bb57fba54f0b11ed9304c07d03e3dab0e55564d27bb17924"
}
],
"status": "succeeded",
"build_id": "2B5749C4-68F8-46B2-B9A3-23BB09A963CF",
"revision": 0,
"artifact_id": "54851E31-863B-47CB-B152-807BB1327913",
"action": "disk",
"configuration": "Test",
"recipe_id": "a5a78327c6844ae71842b05ea69b7bafd2c113136370619877a4b2a4f2b94570",
"log": "\"cmoc\" -DTEST_SEED=2709 -Iinclude --coco --intermediate --deps --stack-space=2048 -O2 --intdir=obj/src/ -c -o obj/src/states.o src/states.c\n\"cmoc\" -DTEST_SEED=2709 -Iinclude --coco --intermediate --deps --stack-space=2048 -O2 --intdir=obj/src/ -c -o obj/src/ui.o src/ui.c\n\"cmoc\" -DTEST_SEED=2709 -Iinclude --coco --intermediate --deps --stack-space=2048 -O2 --intdir=obj/src/ -c -o obj/src/quiz.o src/quiz.c\n\"cmoc\" -DTEST_SEED=2709 -Iinclude --coco --intermediate --deps --stack-space=2048 -O2 --intdir=obj/ -c -o obj/main.o main.c\n\"cmoc\" --dos -O0 --limit=2800 -o obj/boot.bin tools/boot.c\n\"cmoc\" -DTEST_SEED=2709 -Iinclude --coco --intermediate --deps --stack-space=2048 -O2 --intdir=obj/src/ -c -o obj/src/map_data.o src/map_data.c\n\"cmoc\" --coco --intermediate --org=2000 --limit=7800 -o build/CAPITAL.bin obj/main.o obj/src/quiz.o obj/src/ui.o obj/src/states.o obj/src/map_data.o -lgime -linput -lbcontrol -lhirestxt\nperl -e 'print chr(255) x (35*18*256)' > build/CAPITAL.dsk\n\"install-coco-boot-loader\" build/CAPITAL.dsk obj/boot.bin\n\"writecocofile\" build/CAPITAL.dsk build/CAPITAL.bin\n",
"project_id": "56AE77C5-04F7-463D-8596-A549B22EBAE8",
"diagnostics": []
}
+24
View File
@@ -0,0 +1,24 @@
{
"outputs": [
{
"path": "build/CAPITAL.bin",
"sha256": "49f604ae56458b3d32cc6557f4c54ffd146de3b50c29bd1e5c65ce9e2c6f229e",
"bytes": 19089
},
{
"sha256": "603b4726e8aa17f8ecaf4628b8d30dcfda5c037dd75203126727e81faa12f5a0",
"path": "build/CAPITAL.dsk",
"bytes": 161280
}
],
"status": "succeeded",
"action": "disk",
"revision": 0,
"artifact_id": "144A785F-4DE1-4D6C-8354-C7DD49AA77D5",
"build_id": "09FB9FC6-E0D2-4174-A575-0FCCF050AF54",
"configuration": "Debug",
"recipe_id": "a5a78327c6844ae71842b05ea69b7bafd2c113136370619877a4b2a4f2b94570",
"log": "\"cmoc\" -Iinclude --coco --intermediate --deps --stack-space=2048 -O2 -fno-omit-frame-pointer --intdir=obj/src/ -c -o obj/src/states.o src/states.c\n\"cmoc\" -Iinclude --coco --intermediate --deps --stack-space=2048 -O2 -fno-omit-frame-pointer --intdir=obj/src/ -c -o obj/src/ui.o src/ui.c\n\"cmoc\" -Iinclude --coco --intermediate --deps --stack-space=2048 -O2 -fno-omit-frame-pointer --intdir=obj/src/ -c -o obj/src/quiz.o src/quiz.c\n\"cmoc\" -Iinclude --coco --intermediate --deps --stack-space=2048 -O2 -fno-omit-frame-pointer --intdir=obj/ -c -o obj/main.o main.c\n\"cmoc\" --dos -O0 --limit=2800 -o obj/boot.bin tools/boot.c\n\"cmoc\" -Iinclude --coco --intermediate --deps --stack-space=2048 -O2 -fno-omit-frame-pointer --intdir=obj/src/ -c -o obj/src/map_data.o src/map_data.c\n\"cmoc\" --coco --intermediate --org=2000 --limit=7800 -o build/CAPITAL.bin obj/main.o obj/src/quiz.o obj/src/ui.o obj/src/states.o obj/src/map_data.o -lgime -linput -lbcontrol -lhirestxt\nperl -e 'print chr(255) x (35*18*256)' > build/CAPITAL.dsk\n\"install-coco-boot-loader\" build/CAPITAL.dsk obj/boot.bin\n\"writecocofile\" build/CAPITAL.dsk build/CAPITAL.bin\n",
"project_id": "56AE77C5-04F7-463D-8596-A549B22EBAE8",
"diagnostics": []
}
+901
View File
@@ -0,0 +1,901 @@
{
"score": 42,
"positions": [
15,
15,
13,
7
],
"questions": [
{
"question": 1,
"code": "MN",
"state": "Minnesota",
"options": [
"Saint Paul",
"Des Moines",
"Concord",
"Olympia"
],
"answer": "Des Moines",
"correct": false,
"score": 0,
"gold_pixels": 265,
"expected_state_pixels": 265,
"field": 2168
},
{
"question": 2,
"code": "WV",
"state": "West Virginia",
"options": [
"Boise",
"Indianapolis",
"Charleston",
"Topeka"
],
"answer": "Charleston",
"correct": true,
"score": 1,
"gold_pixels": 67,
"expected_state_pixels": 67,
"field": 3726
},
{
"question": 3,
"code": "CT",
"state": "Connecticut",
"options": [
"Boston",
"Olympia",
"Hartford",
"Pierre"
],
"answer": "Hartford",
"correct": true,
"score": 2,
"gold_pixels": 18,
"expected_state_pixels": 18,
"field": 4692
},
{
"question": 4,
"code": "KY",
"state": "Kentucky",
"options": [
"Frankfort",
"Bismarck",
"Indianapolis",
"Providence"
],
"answer": "Frankfort",
"correct": true,
"score": 3,
"gold_pixels": 109,
"expected_state_pixels": 109,
"field": 5658
},
{
"question": 5,
"code": "FL",
"state": "Florida",
"options": [
"Tallahassee",
"Charleston",
"Cheyenne",
"Salt Lake City"
],
"answer": "Tallahassee",
"correct": true,
"score": 4,
"gold_pixels": 204,
"expected_state_pixels": 204,
"field": 6624
},
{
"question": 6,
"code": "LA",
"state": "Louisiana",
"options": [
"Juneau",
"Pierre",
"Baton Rouge",
"Oklahoma City"
],
"answer": "Baton Rouge",
"correct": true,
"score": 5,
"gold_pixels": 150,
"expected_state_pixels": 150,
"field": 7590
},
{
"question": 7,
"code": "WY",
"state": "Wyoming",
"options": [
"Denver",
"Providence",
"Sacramento",
"Cheyenne"
],
"answer": "Cheyenne",
"correct": true,
"score": 6,
"gold_pixels": 308,
"expected_state_pixels": 308,
"field": 8556
},
{
"question": 8,
"code": "OK",
"state": "Oklahoma",
"options": [
"Des Moines",
"Oklahoma City",
"Richmond",
"Carson City"
],
"answer": "Richmond",
"correct": false,
"score": 6,
"gold_pixels": 204,
"expected_state_pixels": 204,
"field": 9522
},
{
"question": 9,
"code": "MT",
"state": "Montana",
"options": [
"Montpelier",
"Helena",
"Little Rock",
"Indianapolis"
],
"answer": "Helena",
"correct": true,
"score": 7,
"gold_pixels": 473,
"expected_state_pixels": 473,
"field": 10488
},
{
"question": 10,
"code": "TX",
"state": "Texas",
"options": [
"Austin",
"Carson City",
"Montgomery",
"Salem"
],
"answer": "Austin",
"correct": true,
"score": 8,
"gold_pixels": 913,
"expected_state_pixels": 913,
"field": 11454
},
{
"question": 11,
"code": "GA",
"state": "Georgia",
"options": [
"Madison",
"Lincoln",
"Pierre",
"Atlanta"
],
"answer": "Atlanta",
"correct": true,
"score": 9,
"gold_pixels": 180,
"expected_state_pixels": 180,
"field": 12420
},
{
"question": 12,
"code": "SC",
"state": "South Carolina",
"options": [
"Springfield",
"Columbia",
"Pierre",
"Atlanta"
],
"answer": "Columbia",
"correct": true,
"score": 10,
"gold_pixels": 94,
"expected_state_pixels": 94,
"field": 13386
},
{
"question": 13,
"code": "NH",
"state": "New Hampshire",
"options": [
"Concord",
"Austin",
"Richmond",
"Jefferson City"
],
"answer": "Concord",
"correct": true,
"score": 11,
"gold_pixels": 19,
"expected_state_pixels": 19,
"field": 14352
},
{
"question": 14,
"code": "UT",
"state": "Utah",
"options": [
"Annapolis",
"Salt Lake City",
"Topeka",
"Des Moines"
],
"answer": "Salt Lake City",
"correct": true,
"score": 12,
"gold_pixels": 263,
"expected_state_pixels": 263,
"field": 15318
},
{
"question": 15,
"code": "VA",
"state": "Virginia",
"options": [
"Bismarck",
"Lansing",
"Richmond",
"Madison"
],
"answer": "Madison",
"correct": false,
"score": 12,
"gold_pixels": 113,
"expected_state_pixels": 113,
"field": 16284
},
{
"question": 16,
"code": "NY",
"state": "New York",
"options": [
"Salt Lake City",
"Cheyenne",
"Albany",
"Oklahoma City"
],
"answer": "Albany",
"correct": true,
"score": 13,
"gold_pixels": 134,
"expected_state_pixels": 134,
"field": 17250
},
{
"question": 17,
"code": "IL",
"state": "Illinois",
"options": [
"Bismarck",
"Richmond",
"Springfield",
"Tallahassee"
],
"answer": "Springfield",
"correct": true,
"score": 14,
"gold_pixels": 173,
"expected_state_pixels": 173,
"field": 18216
},
{
"question": 18,
"code": "NV",
"state": "Nevada",
"options": [
"Carson City",
"Albany",
"Topeka",
"Cheyenne"
],
"answer": "Carson City",
"correct": true,
"score": 15,
"gold_pixels": 350,
"expected_state_pixels": 350,
"field": 19182
},
{
"question": 19,
"code": "RI",
"state": "Rhode Island",
"options": [
"Honolulu",
"Columbia",
"Topeka",
"Providence"
],
"answer": "Providence",
"correct": true,
"score": 16,
"gold_pixels": 3,
"expected_state_pixels": 3,
"field": 20148
},
{
"question": 20,
"code": "IN",
"state": "Indiana",
"options": [
"Indianapolis",
"Denver",
"Jefferson City",
"Columbus"
],
"answer": "Indianapolis",
"correct": true,
"score": 17,
"gold_pixels": 105,
"expected_state_pixels": 105,
"field": 21114
},
{
"question": 21,
"code": "MA",
"state": "Massachusetts",
"options": [
"Indianapolis",
"Albany",
"Boston",
"Montgomery"
],
"answer": "Boston",
"correct": true,
"score": 18,
"gold_pixels": 21,
"expected_state_pixels": 21,
"field": 22080
},
{
"question": 22,
"code": "HI",
"state": "Hawaii",
"options": [
"Saint Paul",
"Honolulu",
"Bismarck",
"Salt Lake City"
],
"answer": "Bismarck",
"correct": false,
"score": 18,
"gold_pixels": 20,
"expected_state_pixels": 20,
"field": 23046
},
{
"question": 23,
"code": "ME",
"state": "Maine",
"options": [
"Little Rock",
"Hartford",
"Augusta",
"Helena"
],
"answer": "Augusta",
"correct": true,
"score": 19,
"gold_pixels": 111,
"expected_state_pixels": 111,
"field": 24012
},
{
"question": 24,
"code": "VT",
"state": "Vermont",
"options": [
"Montpelier",
"Carson City",
"Pierre",
"Richmond"
],
"answer": "Montpelier",
"correct": true,
"score": 20,
"gold_pixels": 22,
"expected_state_pixels": 22,
"field": 24978
},
{
"question": 25,
"code": "CO",
"state": "Colorado",
"options": [
"Richmond",
"Augusta",
"Pierre",
"Denver"
],
"answer": "Denver",
"correct": true,
"score": 21,
"gold_pixels": 327,
"expected_state_pixels": 327,
"field": 25944
},
{
"question": 26,
"code": "AL",
"state": "Alabama",
"options": [
"Bismarck",
"Montgomery",
"Salem",
"Austin"
],
"answer": "Montgomery",
"correct": true,
"score": 22,
"gold_pixels": 155,
"expected_state_pixels": 155,
"field": 26910
},
{
"question": 27,
"code": "WI",
"state": "Wisconsin",
"options": [
"Montgomery",
"Madison",
"Lincoln",
"Saint Paul"
],
"answer": "Madison",
"correct": true,
"score": 23,
"gold_pixels": 183,
"expected_state_pixels": 183,
"field": 27876
},
{
"question": 28,
"code": "AK",
"state": "Alaska",
"options": [
"Juneau",
"Oklahoma City",
"Jackson",
"Saint Paul"
],
"answer": "Juneau",
"correct": true,
"score": 24,
"gold_pixels": 266,
"expected_state_pixels": 266,
"field": 28842
},
{
"question": 29,
"code": "OH",
"state": "Ohio",
"options": [
"Sacramento",
"Jefferson City",
"Columbus",
"Santa Fe"
],
"answer": "Santa Fe",
"correct": false,
"score": 24,
"gold_pixels": 124,
"expected_state_pixels": 124,
"field": 29808
},
{
"question": 30,
"code": "MD",
"state": "Maryland",
"options": [
"Raleigh",
"Atlanta",
"Helena",
"Annapolis"
],
"answer": "Annapolis",
"correct": true,
"score": 25,
"gold_pixels": 22,
"expected_state_pixels": 22,
"field": 30774
},
{
"question": 31,
"code": "MO",
"state": "Missouri",
"options": [
"Columbus",
"Jefferson City",
"Raleigh",
"Frankfort"
],
"answer": "Jefferson City",
"correct": true,
"score": 26,
"gold_pixels": 205,
"expected_state_pixels": 205,
"field": 31740
},
{
"question": 32,
"code": "PA",
"state": "Pennsylvania",
"options": [
"Harrisburg",
"Columbia",
"Tallahassee",
"Cheyenne"
],
"answer": "Harrisburg",
"correct": true,
"score": 27,
"gold_pixels": 138,
"expected_state_pixels": 138,
"field": 32706
},
{
"question": 33,
"code": "MS",
"state": "Mississippi",
"options": [
"Annapolis",
"Jackson",
"Atlanta",
"Denver"
],
"answer": "Jackson",
"correct": true,
"score": 28,
"gold_pixels": 143,
"expected_state_pixels": 143,
"field": 33672
},
{
"question": 34,
"code": "TN",
"state": "Tennessee",
"options": [
"Nashville",
"Raleigh",
"Oklahoma City",
"Hartford"
],
"answer": "Nashville",
"correct": true,
"score": 29,
"gold_pixels": 121,
"expected_state_pixels": 121,
"field": 34638
},
{
"question": 35,
"code": "KS",
"state": "Kansas",
"options": [
"Montgomery",
"Providence",
"Topeka",
"Baton Rouge"
],
"answer": "Topeka",
"correct": true,
"score": 30,
"gold_pixels": 256,
"expected_state_pixels": 256,
"field": 35604
},
{
"question": 36,
"code": "NE",
"state": "Nebraska",
"options": [
"Montpelier",
"Cheyenne",
"Lincoln",
"Harrisburg"
],
"answer": "Harrisburg",
"correct": false,
"score": 30,
"gold_pixels": 236,
"expected_state_pixels": 236,
"field": 36570
},
{
"question": 37,
"code": "WA",
"state": "Washington",
"options": [
"Olympia",
"Helena",
"Charleston",
"Hartford"
],
"answer": "Olympia",
"correct": true,
"score": 31,
"gold_pixels": 210,
"expected_state_pixels": 210,
"field": 37536
},
{
"question": 38,
"code": "NC",
"state": "North Carolina",
"options": [
"Olympia",
"Montpelier",
"Helena",
"Raleigh"
],
"answer": "Raleigh",
"correct": true,
"score": 32,
"gold_pixels": 156,
"expected_state_pixels": 156,
"field": 38502
},
{
"question": 39,
"code": "SD",
"state": "South Dakota",
"options": [
"Pierre",
"Columbia",
"Concord",
"Annapolis"
],
"answer": "Pierre",
"correct": true,
"score": 33,
"gold_pixels": 243,
"expected_state_pixels": 243,
"field": 39468
},
{
"question": 40,
"code": "OR",
"state": "Oregon",
"options": [
"Salt Lake City",
"Salem",
"Juneau",
"Phoenix"
],
"answer": "Salem",
"correct": true,
"score": 34,
"gold_pixels": 303,
"expected_state_pixels": 303,
"field": 40434
},
{
"question": 41,
"code": "DE",
"state": "Delaware",
"options": [
"Augusta",
"Annapolis",
"Dover",
"Honolulu"
],
"answer": "Dover",
"correct": true,
"score": 35,
"gold_pixels": 7,
"expected_state_pixels": 7,
"field": 41400
},
{
"question": 42,
"code": "NM",
"state": "New Mexico",
"options": [
"Albany",
"Indianapolis",
"Santa Fe",
"Olympia"
],
"answer": "Santa Fe",
"correct": true,
"score": 36,
"gold_pixels": 395,
"expected_state_pixels": 395,
"field": 42366
},
{
"question": 43,
"code": "NJ",
"state": "New Jersey",
"options": [
"Phoenix",
"Trenton",
"Little Rock",
"Jackson"
],
"answer": "Little Rock",
"correct": false,
"score": 36,
"gold_pixels": 23,
"expected_state_pixels": 23,
"field": 43332
},
{
"question": 44,
"code": "ID",
"state": "Idaho",
"options": [
"Madison",
"Boise",
"Baton Rouge",
"Columbia"
],
"answer": "Boise",
"correct": true,
"score": 37,
"gold_pixels": 251,
"expected_state_pixels": 251,
"field": 44298
},
{
"question": 45,
"code": "IA",
"state": "Iowa",
"options": [
"Annapolis",
"Harrisburg",
"Hartford",
"Des Moines"
],
"answer": "Des Moines",
"correct": true,
"score": 38,
"gold_pixels": 172,
"expected_state_pixels": 172,
"field": 45264
},
{
"question": 46,
"code": "ND",
"state": "North Dakota",
"options": [
"Montgomery",
"Bismarck",
"Richmond",
"Charleston"
],
"answer": "Bismarck",
"correct": true,
"score": 39,
"gold_pixels": 219,
"expected_state_pixels": 219,
"field": 46230
},
{
"question": 47,
"code": "MI",
"state": "Michigan",
"options": [
"Lansing",
"Atlanta",
"Nashville",
"Pierre"
],
"answer": "Lansing",
"correct": true,
"score": 40,
"gold_pixels": 177,
"expected_state_pixels": 177,
"field": 47196
},
{
"question": 48,
"code": "AR",
"state": "Arkansas",
"options": [
"Little Rock",
"Santa Fe",
"Atlanta",
"Dover"
],
"answer": "Little Rock",
"correct": true,
"score": 41,
"gold_pixels": 160,
"expected_state_pixels": 160,
"field": 48162
},
{
"question": 49,
"code": "AZ",
"state": "Arizona",
"options": [
"Salt Lake City",
"Phoenix",
"Harrisburg",
"Tallahassee"
],
"answer": "Phoenix",
"correct": true,
"score": 42,
"gold_pixels": 374,
"expected_state_pixels": 374,
"field": 49128
},
{
"question": 50,
"code": "CA",
"state": "California",
"options": [
"Albany",
"Sacramento",
"Harrisburg",
"Boise"
],
"answer": "Harrisburg",
"correct": false,
"score": 42,
"gold_pixels": 516,
"expected_state_pixels": 516,
"field": 50094
}
],
"run_id": "6386E425-D645-4C5F-9380-9CACBB3FB5B0",
"artifact": "54851E31-863B-47CB-B152-807BB1327913",
"exit": {
"fields": 53808,
"disk_sha256": "309aee9234063387bb57fba54f0b11ed9304c07d03e3dab0e55564d27bb17924",
"machine_frame": 53808,
"frame_number": 53808,
"image_content": true,
"cpu": "6809",
"cycles": 1597785753,
"generation": 2,
"revision": 0,
"remaining_field_budget": 162192,
"field_clock": 53808,
"isolated": true,
"state": "running",
"ram_kb": 512,
"screen_text": "DISK EXTENDED COLOR BASIC 2.1\nCOPR. 1982, 1986 BY TANDY\nUNDER LICENSE FROM MICROSOFT\nAND MICROWARE SYSTEMS CORP.\n\nOK\nDOS\nLOADM\"CAPITAL.BIN\":EXEC\nTHANKS FOR PLAYING CAPITAL QUEST\n!\nOK\n",
"project_id": "56AE77C5-04F7-463D-8596-A549B22EBAE8",
"boot": 1,
"remaining_boots": 15,
"artifact_disk_sha256": "309aee9234063387bb57fba54f0b11ed9304c07d03e3dab0e55564d27bb17924",
"height": 480,
"width": 640,
"run_id": "6386E425-D645-4C5F-9380-9CACBB3FB5B0",
"artifact_id": "54851E31-863B-47CB-B152-807BB1327913",
"pc": 42963,
"disk_reads": 24320,
"disk_dirty": false,
"disk_provenance": {
"origin_artifact_disk_sha256": "309aee9234063387bb57fba54f0b11ed9304c07d03e3dab0e55564d27bb17924",
"artifact_disk_sha256": "309aee9234063387bb57fba54f0b11ed9304c07d03e3dab0e55564d27bb17924",
"origin_artifact_id": "54851E31-863B-47CB-B152-807BB1327913",
"artifact_id": "54851E31-863B-47CB-B152-807BB1327913",
"origin": "verified_artifact"
},
"disk_origin": "verified_artifact",
"disk_writes": 0,
"disk_original_sha256": "309aee9234063387bb57fba54f0b11ed9304c07d03e3dab0e55564d27bb17924"
}
}
+24
View File
@@ -0,0 +1,24 @@
{
"action": "disk",
"status": "succeeded",
"build_id": "9922B526-537B-4820-BF6C-100EB8846077",
"recipe_id": "a5a78327c6844ae71842b05ea69b7bafd2c113136370619877a4b2a4f2b94570",
"artifact_id": "B6BCF288-91C9-43D8-A460-595792BFD457",
"outputs": [
{
"sha256": "e69f25c3cf8375f8fe20829d6c11a0a8cb57ceafbf10b5ccefe18c3a1773527a",
"path": "build/CAPITAL.bin",
"bytes": 19041
},
{
"bytes": 161280,
"path": "build/CAPITAL.dsk",
"sha256": "98c5e46b17f29b10e28b818a72512cd2e8331294da223600de99589ac4e3aa68"
}
],
"configuration": "Release",
"revision": 0,
"log": "\"cmoc\" -Iinclude --coco --intermediate --deps --stack-space=2048 -O2 --intdir=obj/src/ -c -o obj/src/states.o src/states.c\n\"cmoc\" -Iinclude --coco --intermediate --deps --stack-space=2048 -O2 --intdir=obj/src/ -c -o obj/src/ui.o src/ui.c\n\"cmoc\" -Iinclude --coco --intermediate --deps --stack-space=2048 -O2 --intdir=obj/src/ -c -o obj/src/quiz.o src/quiz.c\n\"cmoc\" -Iinclude --coco --intermediate --deps --stack-space=2048 -O2 --intdir=obj/ -c -o obj/main.o main.c\n\"cmoc\" --dos -O0 --limit=2800 -o obj/boot.bin tools/boot.c\n\"cmoc\" -Iinclude --coco --intermediate --deps --stack-space=2048 -O2 --intdir=obj/src/ -c -o obj/src/map_data.o src/map_data.c\n\"cmoc\" --coco --intermediate --org=2000 --limit=7800 -o build/CAPITAL.bin obj/main.o obj/src/quiz.o obj/src/ui.o obj/src/states.o obj/src/map_data.o -lgime -linput -lbcontrol -lhirestxt\nperl -e 'print chr(255) x (35*18*256)' > build/CAPITAL.dsk\n\"install-coco-boot-loader\" build/CAPITAL.dsk obj/boot.bin\n\"writecocofile\" build/CAPITAL.dsk build/CAPITAL.bin\n",
"project_id": "56AE77C5-04F7-463D-8596-A549B22EBAE8",
"diagnostics": []
}
+211
View File
@@ -0,0 +1,211 @@
{
"configuration": "Release",
"artifact_id": "B6BCF288-91C9-43D8-A460-595792BFD457",
"run_id": "4EC7FB7D-CBF8-4235-AE82-4363E57376CE",
"order": [
"IN",
"MT",
"AR",
"ID",
"NH",
"MA",
"NV",
"NM",
"MO",
"SD",
"VT",
"DE",
"MS",
"MN",
"RI",
"AL",
"MD",
"NE",
"CT",
"WI",
"NY",
"KY",
"WY",
"VA",
"OK",
"WA",
"AK",
"ND",
"TX",
"OH",
"CA",
"FL",
"OR",
"KS",
"GA",
"TN",
"IL",
"WV",
"LA",
"AZ",
"ME",
"MI",
"NC",
"NJ",
"SC",
"UT",
"CO",
"PA",
"IA",
"HI"
],
"positions": [
15,
14,
12,
9
],
"score": 50,
"percentage": 100,
"replay_first_five": [
"MO",
"SD",
"NM",
"IA",
"IN"
],
"credits_run": "74632153-2D82-4DBB-86A2-B0DD23E85769",
"exit": {
"disk_original_sha256": "98c5e46b17f29b10e28b818a72512cd2e8331294da223600de99589ac4e3aa68",
"disk_sha256": "98c5e46b17f29b10e28b818a72512cd2e8331294da223600de99589ac4e3aa68",
"machine_frame": 3084,
"frame_number": 3084,
"image_content": true,
"cpu": "6809",
"cycles": 75479687,
"generation": 2,
"revision": 0,
"remaining_field_budget": 212916,
"field_clock": 3084,
"isolated": true,
"state": "running",
"ram_kb": 512,
"screen_text": "DISK EXTENDED COLOR BASIC 2.1\nCOPR. 1982, 1986 BY TANDY\nUNDER LICENSE FROM MICROSOFT\nAND MICROWARE SYSTEMS CORP.\n\nOK\nDOS\nLOADM\"CAPITAL.BIN\":EXEC\nTHANKS FOR PLAYING CAPITAL QUEST\n!\nOK\n",
"project_id": "56AE77C5-04F7-463D-8596-A549B22EBAE8",
"boot": 1,
"artifact_id": "B6BCF288-91C9-43D8-A460-595792BFD457",
"artifact_disk_sha256": "98c5e46b17f29b10e28b818a72512cd2e8331294da223600de99589ac4e3aa68",
"height": 480,
"width": 640,
"run_id": "74632153-2D82-4DBB-86A2-B0DD23E85769",
"remaining_boots": 15,
"pc": 42963,
"disk_dirty": false,
"disk_provenance": {
"origin_artifact_disk_sha256": "98c5e46b17f29b10e28b818a72512cd2e8331294da223600de99589ac4e3aa68",
"artifact_disk_sha256": "98c5e46b17f29b10e28b818a72512cd2e8331294da223600de99589ac4e3aa68",
"origin_artifact_id": "B6BCF288-91C9-43D8-A460-595792BFD457",
"artifact_id": "B6BCF288-91C9-43D8-A460-595792BFD457",
"origin": "verified_artifact"
},
"disk_reads": 24320,
"fields": 3084,
"disk_origin": "verified_artifact",
"disk_writes": 0
},
"retained": {
"disk_original_sha256": "98c5e46b17f29b10e28b818a72512cd2e8331294da223600de99589ac4e3aa68",
"disk_sha256": "98c5e46b17f29b10e28b818a72512cd2e8331294da223600de99589ac4e3aa68",
"machine_frame": 56464,
"status": "stopped",
"disk_retained": true,
"disk_origin": "verified_artifact",
"retained_disk": {
"run_id": "4EC7FB7D-CBF8-4235-AE82-4363E57376CE",
"origin_artifact_disk_sha256": "98c5e46b17f29b10e28b818a72512cd2e8331294da223600de99589ac4e3aa68",
"artifact_disk_sha256": "98c5e46b17f29b10e28b818a72512cd2e8331294da223600de99589ac4e3aa68",
"origin": "verified_artifact",
"byte_count": 161280,
"artifact_id": "B6BCF288-91C9-43D8-A460-595792BFD457",
"created_at": "2026-11-10T01:35:53Z",
"disk_sha256": "98c5e46b17f29b10e28b818a72512cd2e8331294da223600de99589ac4e3aa68",
"origin_artifact_id": "B6BCF288-91C9-43D8-A460-595792BFD457",
"retained_disk_id": "4EC7FB7D-CBF8-4235-AE82-4363E57376CE"
},
"cpu": "6809",
"retained_disk_id": "4EC7FB7D-CBF8-4235-AE82-4363E57376CE",
"revision": 0,
"generation": 2,
"cycles": 1680371171,
"request_id": "84bf065a-0bf6-40f1-84ef-463c501e9934",
"remaining_field_budget": 159536,
"field_clock": 56464,
"isolated": true,
"state": "paused",
"ram_kb": 512,
"project_id": "56AE77C5-04F7-463D-8596-A549B22EBAE8",
"boot": 1,
"remaining_boots": 15,
"artifact_disk_sha256": "98c5e46b17f29b10e28b818a72512cd2e8331294da223600de99589ac4e3aa68",
"artifact_id": "B6BCF288-91C9-43D8-A460-595792BFD457",
"run_id": "4EC7FB7D-CBF8-4235-AE82-4363E57376CE",
"pc": 11460,
"disk_dirty": false,
"disk_reads": 24320,
"disk_provenance": {
"origin_artifact_disk_sha256": "98c5e46b17f29b10e28b818a72512cd2e8331294da223600de99589ac4e3aa68",
"artifact_disk_sha256": "98c5e46b17f29b10e28b818a72512cd2e8331294da223600de99589ac4e3aa68",
"origin_artifact_id": "B6BCF288-91C9-43D8-A460-595792BFD457",
"artifact_id": "B6BCF288-91C9-43D8-A460-595792BFD457",
"origin": "verified_artifact"
},
"retained_disk_sha256": "98c5e46b17f29b10e28b818a72512cd2e8331294da223600de99589ac4e3aa68",
"fields": 56464,
"disk_writes": 0
},
"retained_credits": {
"disk_origin": "verified_artifact",
"disk_sha256": "98c5e46b17f29b10e28b818a72512cd2e8331294da223600de99589ac4e3aa68",
"disk_retained": true,
"machine_frame": 3084,
"status": "stopped",
"disk_writes": 0,
"cpu": "6809",
"retained_disk": {
"origin": "verified_artifact",
"run_id": "74632153-2D82-4DBB-86A2-B0DD23E85769",
"artifact_disk_sha256": "98c5e46b17f29b10e28b818a72512cd2e8331294da223600de99589ac4e3aa68",
"disk_sha256": "98c5e46b17f29b10e28b818a72512cd2e8331294da223600de99589ac4e3aa68",
"created_at": "2026-11-10T01:35:55Z",
"byte_count": 161280,
"origin_artifact_id": "B6BCF288-91C9-43D8-A460-595792BFD457",
"origin_artifact_disk_sha256": "98c5e46b17f29b10e28b818a72512cd2e8331294da223600de99589ac4e3aa68",
"artifact_id": "B6BCF288-91C9-43D8-A460-595792BFD457",
"retained_disk_id": "74632153-2D82-4DBB-86A2-B0DD23E85769"
},
"retained_disk_id": "74632153-2D82-4DBB-86A2-B0DD23E85769",
"cycles": 75479687,
"generation": 2,
"revision": 0,
"remaining_field_budget": 212916,
"request_id": "204f9fe3-eec4-4e72-84bc-3a41c173da01",
"field_clock": 3084,
"isolated": true,
"state": "paused",
"ram_kb": 512,
"project_id": "56AE77C5-04F7-463D-8596-A549B22EBAE8",
"boot": 1,
"artifact_id": "B6BCF288-91C9-43D8-A460-595792BFD457",
"artifact_disk_sha256": "98c5e46b17f29b10e28b818a72512cd2e8331294da223600de99589ac4e3aa68",
"remaining_boots": 15,
"run_id": "74632153-2D82-4DBB-86A2-B0DD23E85769",
"pc": 42963,
"disk_dirty": false,
"disk_provenance": {
"origin_artifact_disk_sha256": "98c5e46b17f29b10e28b818a72512cd2e8331294da223600de99589ac4e3aa68",
"artifact_disk_sha256": "98c5e46b17f29b10e28b818a72512cd2e8331294da223600de99589ac4e3aa68",
"origin_artifact_id": "B6BCF288-91C9-43D8-A460-595792BFD457",
"artifact_id": "B6BCF288-91C9-43D8-A460-595792BFD457",
"origin": "verified_artifact"
},
"disk_reads": 24320,
"fields": 3084,
"disk_original_sha256": "98c5e46b17f29b10e28b818a72512cd2e8331294da223600de99589ac4e3aa68",
"retained_disk_sha256": "98c5e46b17f29b10e28b818a72512cd2e8331294da223600de99589ac4e3aa68"
}
}
+395
View File
@@ -0,0 +1,395 @@
{
"score": 47,
"corrections": 2,
"questions": [
{
"question": 1,
"code": "MN",
"answer": "sT pAuL",
"correct": true,
"correction": false
},
{
"question": 2,
"code": "WV",
"answer": "Chalreston",
"correct": true,
"correction": true
},
{
"question": 3,
"code": "CT",
"answer": "Austin",
"correct": false,
"correction": false
},
{
"question": 4,
"code": "KY",
"answer": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"correct": false,
"correction": false
},
{
"question": 5,
"code": "FL",
"answer": "Tallhassee",
"correct": false,
"correction": false
},
{
"question": 6,
"code": "LA",
"answer": " bAtOn rOuGe ",
"correct": true,
"correction": false
},
{
"question": 7,
"code": "WY",
"answer": "cheyenne",
"correct": true,
"correction": false
},
{
"question": 8,
"code": "OK",
"answer": "OKLAHOMA CITY",
"correct": true,
"correction": false
},
{
"question": 9,
"code": "MT",
"answer": "HeLeNa",
"correct": true,
"correction": false
},
{
"question": 10,
"code": "TX",
"answer": "austin",
"correct": true,
"correction": false
},
{
"question": 11,
"code": "GA",
"answer": "ATLANTA",
"correct": true,
"correction": false
},
{
"question": 12,
"code": "SC",
"answer": "CoLuMbIa",
"correct": true,
"correction": false
},
{
"question": 13,
"code": "NH",
"answer": "concord",
"correct": true,
"correction": false
},
{
"question": 14,
"code": "UT",
"answer": "SALT LAKE CITY",
"correct": true,
"correction": false
},
{
"question": 15,
"code": "VA",
"answer": "RiChMoNd",
"correct": true,
"correction": false
},
{
"question": 16,
"code": "NY",
"answer": "albany",
"correct": true,
"correction": false
},
{
"question": 17,
"code": "IL",
"answer": "SPRINGFIELD",
"correct": true,
"correction": false
},
{
"question": 18,
"code": "NV",
"answer": "CaRsOn cItY",
"correct": true,
"correction": false
},
{
"question": 19,
"code": "RI",
"answer": "providence",
"correct": true,
"correction": false
},
{
"question": 20,
"code": "IN",
"answer": "INDIANAPOLIS",
"correct": true,
"correction": false
},
{
"question": 21,
"code": "MA",
"answer": "BoStOn",
"correct": true,
"correction": false
},
{
"question": 22,
"code": "HI",
"answer": "honolulu",
"correct": true,
"correction": false
},
{
"question": 23,
"code": "ME",
"answer": "AUGUSTA",
"correct": true,
"correction": false
},
{
"question": 24,
"code": "VT",
"answer": "MoNtPeLiEr",
"correct": true,
"correction": false
},
{
"question": 25,
"code": "CO",
"answer": "Dnever",
"correct": true,
"correction": true
},
{
"question": 26,
"code": "AL",
"answer": "MONTGOMERY",
"correct": true,
"correction": false
},
{
"question": 27,
"code": "WI",
"answer": "MaDiSoN",
"correct": true,
"correction": false
},
{
"question": 28,
"code": "AK",
"answer": "juneau",
"correct": true,
"correction": false
},
{
"question": 29,
"code": "OH",
"answer": "COLUMBUS",
"correct": true,
"correction": false
},
{
"question": 30,
"code": "MD",
"answer": "AnNaPoLiS",
"correct": true,
"correction": false
},
{
"question": 31,
"code": "MO",
"answer": "jefferson city",
"correct": true,
"correction": false
},
{
"question": 32,
"code": "PA",
"answer": "HARRISBURG",
"correct": true,
"correction": false
},
{
"question": 33,
"code": "MS",
"answer": "JaCkSoN",
"correct": true,
"correction": false
},
{
"question": 34,
"code": "TN",
"answer": "nashville",
"correct": true,
"correction": false
},
{
"question": 35,
"code": "KS",
"answer": "TOPEKA",
"correct": true,
"correction": false
},
{
"question": 36,
"code": "NE",
"answer": "LiNcOlN",
"correct": true,
"correction": false
},
{
"question": 37,
"code": "WA",
"answer": "olympia",
"correct": true,
"correction": false
},
{
"question": 38,
"code": "NC",
"answer": "RALEIGH",
"correct": true,
"correction": false
},
{
"question": 39,
"code": "SD",
"answer": "PiErRe",
"correct": true,
"correction": false
},
{
"question": 40,
"code": "OR",
"answer": "salem",
"correct": true,
"correction": false
},
{
"question": 41,
"code": "DE",
"answer": "DOVER",
"correct": true,
"correction": false
},
{
"question": 42,
"code": "NM",
"answer": "SaNtA Fe",
"correct": true,
"correction": false
},
{
"question": 43,
"code": "NJ",
"answer": "trenton",
"correct": true,
"correction": false
},
{
"question": 44,
"code": "ID",
"answer": "BOISE",
"correct": true,
"correction": false
},
{
"question": 45,
"code": "IA",
"answer": "DeS MoInEs",
"correct": true,
"correction": false
},
{
"question": 46,
"code": "ND",
"answer": "bismarck",
"correct": true,
"correction": false
},
{
"question": 47,
"code": "MI",
"answer": "LANSING",
"correct": true,
"correction": false
},
{
"question": 48,
"code": "AR",
"answer": "LiTtLe rOcK",
"correct": true,
"correction": false
},
{
"question": 49,
"code": "AZ",
"answer": "phoenix",
"correct": true,
"correction": false
},
{
"question": 50,
"code": "CA",
"answer": "SACRAMENTO",
"correct": true,
"correction": false
}
],
"run_id": "DEA80B37-7A53-4F77-82B2-86A9569376C3",
"exit": {
"disk_reads": 24320,
"disk_sha256": "309aee9234063387bb57fba54f0b11ed9304c07d03e3dab0e55564d27bb17924",
"machine_frame": 123344,
"frame_number": 123344,
"image_content": true,
"cpu": "6809",
"cycles": 3681115004,
"generation": 2,
"revision": 0,
"remaining_field_budget": 92656,
"field_clock": 123344,
"isolated": true,
"state": "running",
"ram_kb": 512,
"screen_text": "DISK EXTENDED COLOR BASIC 2.1\nCOPR. 1982, 1986 BY TANDY\nUNDER LICENSE FROM MICROSOFT\nAND MICROWARE SYSTEMS CORP.\n\nOK\nDOS\nLOADM\"CAPITAL.BIN\":EXEC\nTHANKS FOR PLAYING CAPITAL QUEST\n!\nOK\n",
"project_id": "56AE77C5-04F7-463D-8596-A549B22EBAE8",
"boot": 1,
"artifact_id": "54851E31-863B-47CB-B152-807BB1327913",
"remaining_boots": 15,
"height": 480,
"width": 640,
"run_id": "DEA80B37-7A53-4F77-82B2-86A9569376C3",
"artifact_disk_sha256": "309aee9234063387bb57fba54f0b11ed9304c07d03e3dab0e55564d27bb17924",
"pc": 42963,
"disk_dirty": false,
"fields": 123344,
"disk_provenance": {
"artifact_disk_sha256": "309aee9234063387bb57fba54f0b11ed9304c07d03e3dab0e55564d27bb17924",
"origin_artifact_disk_sha256": "309aee9234063387bb57fba54f0b11ed9304c07d03e3dab0e55564d27bb17924",
"origin_artifact_id": "54851E31-863B-47CB-B152-807BB1327913",
"artifact_id": "54851E31-863B-47CB-B152-807BB1327913",
"origin": "verified_artifact"
},
"disk_origin": "verified_artifact",
"disk_original_sha256": "309aee9234063387bb57fba54f0b11ed9304c07d03e3dab0e55564d27bb17924",
"disk_writes": 0
}
}
+6
View File
@@ -0,0 +1,6 @@
extern const unsigned char national_spans[];
extern const unsigned national_offsets[51];
extern const unsigned char northeast_spans[];
extern const unsigned northeast_offsets[51];
extern const unsigned char hawaii_spans[];
extern const unsigned hawaii_offsets[51];
+19
View File
@@ -0,0 +1,19 @@
#ifndef QUIZ_H
#define QUIZ_H
#define STATE_COUNT 50
#define ANSWER_SIZE 40
typedef unsigned char U8;
typedef struct { const char *code; const char *name; const char *capital; } State;
extern const State states[50];
extern U8 order[50], options[4], question, score, corrections;
extern U8 answered[50], correct[50], corrected[50];
extern char responses[50][ANSWER_SIZE];
extern unsigned random_state;
void quiz_start(unsigned seed);
unsigned quiz_random(unsigned bound);
void quiz_options(U8 state);
void normalize(const char *in, char *out);
/* 2 exact/alias, 1 near, 0 wrong (including a different known capital). */
U8 classify(U8 state, const char *answer);
void quiz_record(U8 state, const char *answer, U8 right, U8 spelling);
#endif
+11
View File
@@ -0,0 +1,11 @@
#ifndef UI_H
#define UI_H
#include "quiz.h"
void text(unsigned x,unsigned y,const char *s,U8 color);
void frame(const char *label);
void show_map(U8 state);
U8 next_key(void);
void release_keys(void);
void close_input(void);
extern unsigned entropy;
#endif
+188
View File
@@ -0,0 +1,188 @@
#include <cmoc.h>
#include <coco.h>
#include <Keyboard.h>
#include <vcc/gime.h>
#include "quiz.h"
#include "ui.h"
static char line[54],answer[ANSWER_SIZE];
static U8 mode,spelling_attempt;
/* Named phases make read-only debugger snapshots useful without altering play. */
U8 phase, current_state;
static void present(void)
{
if(!gime_present()) {gime_close();setHighSpeed(FALSE);printf("Graphics timer stopped.\n");exit(1);}
}
static U8 choose(const char *allowed)
{
U8 c;release_keys();
do {c=next_key();if(c>='a' && c<='z')c-='a'-'A';}while(!strchr(allowed,c));
return c;
}
static void credits(void)
{
phase=5;frame("CREDITS");
text(8,19,"A MAP FOR EVERY STATE",6);
text(8,39,"Map (c) Fla-shop.com",7);
text(8,51,"https://www.fla-shop.com/svg/usa/",2);
text(8,65,"Creative Commons Attribution 4.0",7);
text(8,77,"https://creativecommons.org/licenses/by/4.0/",2);
text(8,94,"Adapted: rasterized, reduced, recolored;",7);
text(8,105,"state masks and enlarged detail views added.",7);
text(8,124,"Font: Pierre Sarrazin, public domain.",2);
text(8,138,"C / CMOC; VCC Plus GIME and keyboard APIs.",2);
text(8,158,"Full sources and notices: assets/CREDITS.md",7);
text(8,180,"SPACE: back",6);present();choose(" ");
}
static U8 title(void)
{
U8 c;
do {
phase=0;frame("50 STATES");
text(8,19,"HOW WELL DO YOU KNOW YOUR CAPITALS?",6);
show_map(49);
/* Right panel is replaced by the mode selector. */
gime_fill_rect(209,32,111,111,0);
text(212,40,"CHOOSE A MODE",6);
text(212,58,"1 MULTIPLE",7);text(224,69,"CHOICE",7);
text(212,89,"2 TYPE THE",7);text(224,100,"CAPITAL",7);
text(212,123,"C CREDITS",2);text(212,136,"Q QUIT",2);
text(8,149,"Choice: 1-4. Type: letters, spaces, Enter.",7);
text(8,160,"Backspace edits. Near spelling: retry/reveal.",2);
text(8,171,"50 questions. Release keys between presses.",2);
text(8,182,"Gold marks the state. SPACE after feedback.",6);
present();c=choose("12CQ");if(c=='C')credits();
}while(c=='C');
return c;
}
static void question_screen(void)
{
phase=1;frame(mode==1?"MULTIPLE CHOICE":"TYPE THE CAPITAL");
sprintf(line,"Question %u of 50 Score %u",(unsigned)question+1,(unsigned)score);
text(8,19,line,7);
show_map(current_state);
gime_fill_rect(0,143,320,49,1);
sprintf(line,"%s: what is its capital?",states[current_state].name);
text(8,145,line,6);
}
static U8 multiple_choice(void)
{
U8 i,c;
quiz_options(current_state);question_screen();
for(i=0;i<4;++i) {
sprintf(line,"%u %s",(unsigned)i+1,states[options[i]].capital);
text(8+(i%2)*156,157+(i/2)*12,line,7);
}
text(8,183,"Press 1, 2, 3 or 4",2);present();c=choose("1234")-'1';
strcpy(answer,states[options[c]].capital);
return options[c]==current_state;
}
static void input_screen(U8 too_long)
{
gime_fill_rect(0,155,320,37,1);text(8,158,answer,7);
text(8+strlen(answer)*6,158,"_",6);
text(8,171,too_long?"39 characters maximum. Backspace to edit.":"Enter submits. Backspace edits. Esc reveals.",2);
text(8,183,"Case and extra spaces do not matter.",2);present();
}
static void input_edit(U8 old_n,U8 new_n)
{
U8 p,first=old_n<new_n?old_n:new_n;
/* Both hidden/displayed pages receive the same tiny edit. Static help and
the map are already drawn, so normal typing never repaints the map. */
for(p=0;p<2;++p) {
gime_fill_rect(8+(unsigned)first*6,158,12,8,1);
text(8+(unsigned)first*6,158,answer+first,7);
text(8+(unsigned)new_n*6,158,"_",6);present();
}
}
static U8 typed_answer(void)
{
U8 c,n=0,result,old_n;
answer[0]=0;spelling_attempt=0;
question_screen();input_screen(0);question_screen();input_screen(0);release_keys();
for(;;) {
c=next_key();release_keys();
if(c==3 || c==27) {strcpy(answer,"[revealed]");return 0;}
if(c==8 || c==127) {old_n=n;if(n)answer[--n]=0;input_edit(old_n,n);}
else if(c==13 || c==10) {
result=classify(current_state,answer);
if(result==2)return 1;
if(result==0)return 0;
question_screen();phase=2;
text(8,158,"That looks close. Check your spelling",6);
text(8,169,"and try again. R: retry V: reveal",7);
text(8,182,"No point awarded yet.",2);present();
c=choose("RV");
if(c=='V')return 0;
spelling_attempt=1;
question_screen();input_screen(0);question_screen();input_screen(0);release_keys();
} else if((c>='a' && c<='z') || (c>='A' && c<='Z') || c==' ' || c=='.' || c=='\t') {
if(n<ANSWER_SIZE-1){old_n=n;answer[n++]=c;answer[n]=0;input_edit(old_n,n);}
else {input_screen(1);input_screen(1);}
}
}
}
static void feedback(U8 right)
{
question_screen();phase=3;
text(8,158,right?"CORRECT!":"NOT THIS TIME.",right?6:5);
sprintf(line,"The capital is %s.",states[current_state].capital);text(8,170,line,7);
text(8,183,"Release your key, then SPACE to continue.",2);present();choose(" ");
}
static U8 results(void)
{
U8 c,i,page,start,missed=50-score;
for(;;) {
phase=4;frame("YOUR RESULTS");
text(8,19,"JOURNEY COMPLETE",6);
sprintf(line,"%u / 50 correct %u%%",(unsigned)score,(unsigned)score*2);text(8,48,line,7);
sprintf(line,"%u correct after spelling correction",(unsigned)corrections);text(8,70,line,2);
sprintf(line,"%u states to revisit",(unsigned)missed);text(8,92,line,7);
text(8,123,"R REVIEW MISSED STATES",6);
text(8,143,"P PLAY AGAIN",7);text(8,163,"Q QUIT TO BASIC",7);
text(8,183,"Every state asked once. Keep exploring!",2);present();c=choose("RPQ");
if(c!='R')return c;
page=0;start=0;
for(;;) {
frame("MISSED STATES");
sprintf(line,"Review page %u",(unsigned)page+1);text(8,19,line,6);
i=start;c=0;
while(i<50 && c<3) {
if(!correct[order[i]]) {
text(8,39+c*43,states[order[i]].name,6);
sprintf(line,"You: %s",responses[order[i]][0]?(const char *)responses[order[i]]:"[blank]");text(8,50+c*43,line,7);
sprintf(line,"Capital: %s",states[order[i]].capital);text(8,61+c*43,line,2);++c;
}
++i;
}
while(i<50 && correct[order[i]])++i;
if(!missed)text(8,60,"A perfect trip! No missed states.",7);
text(8,180,i<50?"N NEXT PAGE B BACK TO RESULTS":"B BACK TO RESULTS",6);present();
c=choose(i<50?"NB":"B");if(c=='B')break;
start=i;++page;
}
}
}
int main(void)
{
U8 c,right;unsigned seed;
if(!gime_open()){printf("Requires 512 KB CoCo 3 in BASIC.\n");return 1;}
setHighSpeed(TRUE);
gime_set_palette(0,1);gime_set_palette(1,3);gime_set_palette(2,56);
gime_set_palette(3,28);gime_set_palette(4,14);gime_set_palette(5,39);
gime_set_palette(6,54);gime_set_palette(7,63);
for(;;) {
c=title();if(c=='Q')break;mode=c-'0';
seed=entropy ^ getTimer();
#ifdef TEST_SEED
seed=TEST_SEED;
#endif
quiz_start(seed);
for(question=0;question<50;++question) {
current_state=order[question];spelling_attempt=0;
right=mode==1?multiple_choice():typed_answer();
quiz_record(current_state,answer,right,spelling_attempt);feedback(right);
}
if(results()=='Q')break;
}
release_keys();close_input();gime_close();setHighSpeed(FALSE);printf("Thanks for playing Capital Quest!\n");return 0;
}
+14
View File
@@ -0,0 +1,14 @@
/* Adapted from Fla-shop.com, CC BY 4.0. See assets/CREDITS.md. */
#include "map_data.h"
const unsigned char national_spans[] = {
67,140,4,68,137,8,69,137,8,70,137,8,71,137,9,72,137,9,73,137,9,74,137,10,75,137,10,76,136,12,77,136,12,78,136,12,79,136,12,80,137,11,81,137,11,82,137,3,83,137,2,84,137,3,85,137,1,85,139,1,82,30,4,83,28,12,84,28,12,85,26,14,86,27,14,87,29,12,88,25,2,88,28,13,89,25,16,90,26,15,91,22,1,91,28,14,92,27,15,93,25,17,94,24,18,95,25,10,95,36,7,96,23,1,96,25,9,96,35,3,96,39,6,96,46,1,97,27,7,97,35,1,97,45,4,98,27,6,98,47,3,99,30,3,99,34,1,99,48,5,100,30,2,100,49,4,101,29,2,101,50,2,102,27,2,103,24,2,104,22,1,105,12,3,105,18,2,56,48,5,57,48,11,58,47,17,59,45,19,60,45,18,61,45,18,62,45,18,63,45,18,64,45,18,65,45,18,66,45,17,67,44,18,68,43,19,69,43,19,70,43,19,71,43,19,72,41,21,73,43,18,74,45,16,75,47,14,76,49,12,77,51,10,78,53,8,79,56,4,62,126,2,63,114,14,64,114,16,65,114,15,66,115,14,67,115,14,68,115,13,69,115,12,70,115,12,71,114,12,72,114,12,73,116,9,74,116,9,75,116,6,29,20,2,30,20,5,31,20,9,32,20,12,33,19,13,34,18,14,35,18,14,36,19,12,37,19,12,38,19,12,39,18,13,40,19,11,41,19,11,42,19,11,43,20,9,44,20,10,45,20,1,45,22,9,46,21,10,47,22,10,48,20,13,49,21,12,50,22,12,51,21,14,52,21,15,53,22,14,54,22,15,55,22,16,56,23,16,57,23,16,58,24,16,59,24,17,60,24,17,61,26,16,62,28,15,63,28,15,64,30,14,65,31,13,66,32,12,67,33,10,68,33,9,69,33,9,70,33,9,71,40,1,43,67,9,44,67,21,45,67,21,46,66,22,47,66,22,48,66,22,49,66,22,50,66,22,51,66,22,52,66,22,53,65,23,54,65,23,55,65,23,56,65,23,57,68,20,58,78,10,32,183,1,33,180,5,34,180,6,35,180,3,36,180,1,36,184,1,37,182,1,43,175,1,44,175,1,45,175,2,46,176,1,47,176,2,82,161,2,83,141,8,83,151,12,84,141,22,85,141,2,85,145,19,86,148,4,86,155,9,87,149,1,87,156,9,88,157,9,89,159,8,90,159,8,91,159,9,92,159,9,93,159,1,93,161,8,94,160,9,95,160,10,96,161,9,97,163,8,98,163,8,99,164,7,100,165,5,101,166,4,102,167,3,105,165,1,66,150,3,67,146,7,68,146,8,69,146,9,70,147,10,71,147,11,72,147,12,73,148,12,74,148,13,75,149,12,76,149,15,77,149,14,78,149,14,79,149,14,80,149,13,81,149,12,82,150,1,93,58,1,95,64,1,96,64,2,98,71,2,101,73,3,102,73,4,103,73,5,104,73,2,7,49,1,8,49,2,9,49,2,10,49,2,11,48,2,12,48,3,13,48,3,14,48,3,15,47,5,16,47,5,17,47,6,18,47,7,19,48,5,20,48,5,21,47,6,22,46,9,23,46,9,24,45,10,25,45,11,26,45,11,27,44,18,28,44,18,29,44,18,30,44,18,31,43,19,32,43,18,33,44,17,34,49,12,35,55,6,38,128,7,39,128,7,40,128,8,41,127,8,42,126,9,43,125,10,44,125,10,45,125,10,46,124,12,47,124,12,48,124,12,49,125,11,50,126,10,51,127,9,52,128,8,53,128,8,54,128,7,55,129,6,56,131,4,57,131,4,58,131,1,40,141,3,41,136,8,42,136,8,43,136,8,44,136,8,45,137,7,46,137,7,47,137,8,48,137,8,49,137,8,50,137,8,51,137,7,52,137,6,53,137,6,54,136,5,35,108,15,36,108,15,37,107,17,38,108,17,39,108,18,40,109,18,41,109,17,42,109,16,43,109,15,44,110,14,45,110,9,45,123,1,48,89,2,49,89,22,50,89,22,51,89,23,52,89,24,53,89,24,54,89,24,55,89,24,56,89,24,57,89,24,58,89,24,59,94,19,51,146,1,52,144,9,53,144,9,54,143,11,55,141,14,56,136,18,57,136,17,58,135,17,59,135,10,60,133,3,76,122,3,77,116,10,78,116,10,79,116,10,80,117,8,81,117,8,82,118,6,83,118,6,84,118,13,85,118,13,86,117,15,87,117,15,88,117,17,89,121,2,89,126,7,90,127,4,90,133,2,91,128,1,9,186,1,9,189,1,10,186,5,11,186,6,12,185,7,13,185,7,14,185,8,15,185,9,16,185,9,17,185,11,18,184,11,19,184,10,20,185,7,21,185,6,22,185,6,23,186,3,24,186,2,25,186,2,44,171,3,45,170,3,46,171,2,46,174,1,47,171,2,47,174,1,48,171,7,49,176,2,50,177,1,28,186,1,29,184,3,30,180,8,31,180,3,31,187,2,32,187,3,33,189,1,19,131,1,20,130,1,20,141,1,21,128,6,21,138,4,21,143,1,22,128,16,23,132,4,23,138,2,23,142,1,24,134,1,24,142,2,25,142,5,26,134,1,26,141,6,27,140,8,28,139,9,29,139,9,30,139,8,30,149,1,31,138,8,31,148,2,32,139,12,33,138,13,34,139,12,35,140,11,36,140,10,37,140,10,38,139,10,39,139,2,12,111,1,13,106,7,14,106,7,15,106,13,16,106,15,16,123,1,16,125,1,17,106,21,18,107,17,19,107,16,20,107,15,21,107,13,22,107,12,23,107,12,24,107,12,25,107,11,26,107,11,27,108,10,28,108,10,29,108,10,30,108,11,31,108,12,32,108,13,33,108,14,68,129,7,69,128,8,70,128,8,71,127,9,72,127,9,73,126,10,74,127,9,75,127,9,76,127,8,77,127,8,78,127,8,79,127,8,80,126,9,81,126,10,82,125,11,83,132,4,84,132,4,85,133,3,86,133,1,46,119,3,47,111,12,48,112,11,49,112,11,50,113,11,51,114,11,52,114,12,53,114,13,54,114,13,55,114,13,56,114,14,57,114,16,58,114,16,59,114,16,60,114,18,61,114,12,61,129,2,62,129,1,8,52,3,9,52,9,10,52,15,11,52,23,12,52,34,13,52,33,14,53,32,15,53,32,16,54,31,17,55,30,18,55,30,19,54,30,20,54,30,21,56,28,22,56,28,23,56,28,24,57,27,25,57,6,25,68,16,26,76,8,36,84,5,37,84,17,38,84,22,39,84,23,40,83,24,41,83,25,42,83,25,43,89,19,44,89,19,45,89,20,46,89,20,47,92,17,33,33,5,34,33,10,35,33,15,36,32,19,37,32,19,38,32,19,39,32,18,40,31,19,41,31,19,42,31,19,43,31,19,44,32,17,45,32,17,46,33,16,47,34,15,48,34,14,49,35,13,50,36,12,51,37,11,52,37,11,53,38,9,54,39,8,55,40,7,56,40,7,57,41,6,58,42,3,59,42,2,60,43,1,21,183,1,22,183,1,23,182,2,24,182,3,25,182,3,26,182,3,27,182,4,28,182,2,37,176,4,38,176,3,39,177,2,40,178,2,41,178,2,42,177,3,43,176,4,44,177,2,45,178,1,58,65,2,59,65,12,60,64,20,61,64,20,62,64,20,63,64,20,64,64,20,65,64,20,66,63,21,67,63,20,68,63,2Line truncated
};
const unsigned national_offsets[51] = {0,60,177,249,291,423,471,492,507,588,639,663,750,813,858,894,930,960,1014,1068,1095,1116,1206,1278,1335,1389,1449,1485,1569,1593,1620,1689,1740,1785,1818,1863,1902,1959,1989,1995,2028,2064,2088,2238,2301,2325,2367,2427,2457,2523,2574};
const unsigned char northeast_spans[] = {
48,68,2,49,63,7,50,59,12,51,59,12,52,60,11,53,60,11,54,60,10,55,60,7,56,60,4,57,60,2,57,68,3,58,60,2,58,66,4,59,64,4,60,65,1,73,48,1,75,48,1,76,48,2,77,49,2,78,49,2,79,49,3,80,50,3,81,50,5,82,50,5,83,51,4,98,0,1,99,0,2,0,72,13,1,72,13,2,72,14,3,71,15,4,71,16,5,71,16,6,71,16,7,70,17,8,70,18,9,71,20,10,70,21,11,71,20,12,70,24,13,70,25,14,70,25,15,69,27,16,69,26,17,68,25,18,68,25,19,68,22,20,68,21,21,69,15,21,85,1,21,88,1,22,70,14,23,70,14,24,70,14,25,70,14,26,71,11,27,71,11,28,71,9,29,72,7,30,72,5,31,72,5,32,73,4,33,73,4,34,74,2,35,75,1,75,41,6,76,35,11,77,32,13,77,46,1,78,33,11,78,45,3,79,35,8,79,45,3,80,36,8,80,46,2,81,38,6,81,46,3,82,40,4,82,45,4,83,40,4,83,46,3,84,40,4,84,46,4,85,40,5,85,46,9,86,39,6,86,47,2,86,50,5,87,42,4,87,50,5,88,45,1,88,51,4,89,52,3,90,52,2,91,51,2,92,51,2,39,74,2,40,73,4,41,70,6,42,65,10,43,61,14,44,59,19,45,59,19,46,59,13,46,74,6,47,59,9,47,74,7,47,82,2,48,59,4,48,74,5,48,80,2,49,76,2,49,80,1,50,75,2,50,80,1,19,65,2,20,65,2,21,65,2,22,65,3,23,66,3,24,66,3,25,66,3,26,65,4,27,65,5,28,64,6,29,64,6,30,64,7,31,64,7,32,64,7,33,63,9,34,63,9,35,63,10,36,63,11,37,64,12,38,64,10,39,64,9,40,64,6,41,64,1,59,51,4,60,50,7,61,50,7,62,50,8,63,50,8,64,50,7,65,51,8,66,52,7,67,53,6,68,53,6,69,53,6,70,52,8,71,52,8,72,50,9,73,50,9,74,49,9,75,50,8,76,51,6,77,55,1,78,55,1,79,55,1,24,51,1,25,47,5,26,42,11,27,41,12,28,40,13,29,39,15,30,39,15,31,38,16,32,37,17,33,37,17,34,35,19,35,35,20,36,35,20,37,36,20,38,36,20,39,36,21,40,37,20,41,35,22,42,34,23,43,33,25,44,30,28,45,21,37,46,18,40,47,17,41,48,18,40,49,19,39,50,19,39,51,19,39,52,18,40,53,17,24,53,47,12,54,16,19,54,48,11,55,15,15,55,49,10,56,14,10,56,50,9,57,15,4,57,52,7,58,56,3,59,58,2,60,58,1,61,59,6,62,59,4,63,59,1,61,6,3,62,4,5,63,3,6,64,2,7,65,1,8,66,0,9,67,0,10,68,0,10,69,0,10,70,0,10,71,0,10,72,0,10,73,0,10,74,0,10,75,0,10,76,0,10,77,0,10,78,0,10,79,0,9,80,0,9,81,0,9,82,0,8,83,0,6,84,0,5,85,0,4,86,0,4,87,0,4,88,0,2,89,0,1,90,0,1,91,0,1,54,41,5,55,35,12,56,30,18,57,24,25,58,12,2,58,19,32,59,10,40,60,10,39,61,10,39,62,10,39,63,10,39,64,10,39,65,10,39,66,11,39,67,11,40,68,11,41,69,11,41,70,11,40,71,11,39,72,11,37,73,12,34,74,12,29,75,12,23,76,12,18,77,12,16,78,13,5,78,21,4,47,72,1,48,71,2,49,72,2,50,72,2,51,72,3,52,72,3,53,72,1,21,63,1,22,59,5,23,55,9,24,53,12,25,54,11,26,54,10,27,54,10,28,55,8,29,55,8,30,55,8,31,55,8,32,55,8,33,55,7,34,56,6,35,56,6,36,57,5,37,57,5,38,58,5,39,58,5,40,58,5,41,58,5,42,59,2,81,29,2,81,34,1,82,29,8,83,29,10,84,28,11,85,27,12,86,26,12,87,25,13,88,25,16,89,24,21,90,21,26,91,21,26,92,20,27,93,20,26,94,19,29,94,51,2,95,19,28,95,51,2,96,19,29,96,51,1,97,18,26,97,45,3,98,18,28,98,47,2,99,17,31,99,49,3,78,28,3,79,10,2,79,18,2,79,25,7,80,10,19,80,32,1,81,10,18,82,9,19,83,8,20,84,6,21,85,5,21,86,5,20,87,5,19,88,4,20,89,2,19,90,2,18,91,2,18,92,1,18,93,1,18,94,0,18,95,0,18,96,0,18,97,1,16,98,2,15,99,2,15
};
const unsigned northeast_offsets[51] = {0,0,0,0,0,0,0,45,75,75,75,75,75,75,75,75,75,81,81,195,288,345,345,345,345,345,345,345,345,414,477,477,612,612,612,705,705,705,786,807,807,807,807,807,807,873,951,951,1026,1026,1026};
const unsigned char hawaii_spans[] = {
8,8,4,9,6,7,10,5,8,11,6,6,12,7,5,16,37,1,17,36,2,18,35,4,19,33,7,20,32,8,21,33,7,22,34,7,23,34,10,24,34,10,26,55,2,27,50,10,29,62,2,30,61,4,31,61,4,32,55,5,32,62,9,33,55,4,33,64,10,34,56,3,34,66,9,35,66,8,36,66,8,37,64,1,37,66,6,38,61,4,38,66,1,44,77,2,45,76,5,46,76,7,47,77,9,48,77,11,49,77,13,50,76,15,51,75,16,52,74,17,53,74,17,54,75,18,55,75,19,56,75,19,57,75,21,58,75,21,59,76,19,60,76,17,61,76,11,61,88,4,62,76,9,62,89,1,63,76,7,64,76,7,65,77,5,66,78,4,67,79,2,68,79,2
};
const unsigned hawaii_offsets[51] = {0,0,0,0,0,0,0,0,0,0,0,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174};
+113
View File
@@ -0,0 +1,113 @@
#include "quiz.h"
#ifdef HOST_TEST
#include <string.h>
#else
#include <cmoc.h>
#endif
U8 order[50], options[4], question, score, corrections;
U8 answered[50], correct[50], corrected[50];
char responses[50][ANSWER_SIZE];
unsigned random_state;
static U8 distance_rows[3][ANSWER_SIZE];
unsigned quiz_random(unsigned bound)
{
unsigned x, limit;
limit = 65535u - (65535u % bound);
do {
x = random_state;
x ^= x << 7; x &= 65535u;
x ^= x >> 9;
x ^= x << 8; x &= 65535u;
random_state = x;
--x;
} while (x >= limit);
return x % bound;
}
void quiz_start(unsigned seed)
{
U8 i,j,t;
random_state = seed ? seed : 0xACE1;
question=score=corrections=0;
memset(answered,0,sizeof(answered));
memset(correct,0,sizeof(correct));
memset(corrected,0,sizeof(corrected));
memset(responses,0,sizeof(responses));
for(i=0;i<50;++i) order[i]=i;
for(i=49;i>0;--i) {
j=(U8)quiz_random(i+1);t=order[i];order[i]=order[j];order[j]=t;
}
}
void quiz_options(U8 state)
{
U8 i,j,c,t;
options[0]=state;
for(i=1;i<4;++i) {
do {
c=(U8)quiz_random(50);
for(j=0;j<i && options[j]!=c;++j) {}
} while(j<i);
options[i]=c;
}
for(i=3;i>0;--i) {
j=(U8)quiz_random(i+1);t=options[i];options[i]=options[j];options[j]=t;
}
}
void normalize(const char *in,char *out)
{
U8 n=0,space=0,c;
while((c=(U8)*in++)!=0 && n<ANSWER_SIZE-1) {
if(c==' ' || c=='\t' || c=='\r' || c=='\n') { if(n) space=1; }
else {
if(space && n<ANSWER_SIZE-1) out[n++]=' ';
space=0;
if(c>='A' && c<='Z') c += 'a'-'A';
if(n<ANSWER_SIZE-1) out[n++]=c;
}
}
out[n]=0;
if(!strcmp(out,"st paul") || !strcmp(out,"st. paul")) strcpy(out,"saint paul");
}
static U8 distance(const char *a,const char *b)
{
U8 i,j,n=(U8)strlen(a),m=(U8)strlen(b),v,cost,d;
U8 *now,*prev,*older;
for(j=0;j<=m;++j) distance_rows[0][j]=j;
for(i=1;i<=n;++i) {
now=distance_rows[i%3];prev=distance_rows[(i-1)%3];older=distance_rows[(i+1)%3];
now[0]=i;
for(j=1;j<=m;++j) {
cost=a[i-1]==b[j-1]?0:1;
v=prev[j]+1;d=now[j-1]+1;if(d<v)v=d;
d=prev[j-1]+cost;if(d<v)v=d;
if(i>1 && j>1 && a[i-1]==b[j-2] && a[i-2]==b[j-1]) {
d=older[j-2]+1;if(d<v)v=d;
}
now[j]=v;
}
}
return distance_rows[n%3][m];
}
U8 classify(U8 state,const char *answer)
{
char a[ANSWER_SIZE],b[ANSWER_SIZE];U8 i,n,m,d;
normalize(answer,a);normalize(states[state].capital,b);
if(!strcmp(a,b)) return 2;
/* Known wrong capitals take priority over fuzzy comparison. */
for(i=0;i<50;++i) {
normalize(states[i].capital,b);
if(!strcmp(a,b)) return 0;
}
normalize(states[state].capital,b);
n=(U8)strlen(a);m=(U8)strlen(b);
if(n<3 || m<4) return 0;
d=distance(a,b);
return d<=(m>=9?2:1)?1:0;
}
void quiz_record(U8 state,const char *answer,U8 right,U8 spelling)
{
if(answered[state]) return;
answered[state]=1;correct[state]=right;corrected[state]=right && spelling;
strncpy(responses[state],answer,ANSWER_SIZE-1);responses[state][ANSWER_SIZE-1]=0;
if(right) ++score;
if(right && spelling) ++corrections;
}
+53
View File
@@ -0,0 +1,53 @@
#include "quiz.h"
const State states[50] = {
{"AL","Alabama","Montgomery"},
{"AK","Alaska","Juneau"},
{"AZ","Arizona","Phoenix"},
{"AR","Arkansas","Little Rock"},
{"CA","California","Sacramento"},
{"CO","Colorado","Denver"},
{"CT","Connecticut","Hartford"},
{"DE","Delaware","Dover"},
{"FL","Florida","Tallahassee"},
{"GA","Georgia","Atlanta"},
{"HI","Hawaii","Honolulu"},
{"ID","Idaho","Boise"},
{"IL","Illinois","Springfield"},
{"IN","Indiana","Indianapolis"},
{"IA","Iowa","Des Moines"},
{"KS","Kansas","Topeka"},
{"KY","Kentucky","Frankfort"},
{"LA","Louisiana","Baton Rouge"},
{"ME","Maine","Augusta"},
{"MD","Maryland","Annapolis"},
{"MA","Massachusetts","Boston"},
{"MI","Michigan","Lansing"},
{"MN","Minnesota","Saint Paul"},
{"MS","Mississippi","Jackson"},
{"MO","Missouri","Jefferson City"},
{"MT","Montana","Helena"},
{"NE","Nebraska","Lincoln"},
{"NV","Nevada","Carson City"},
{"NH","New Hampshire","Concord"},
{"NJ","New Jersey","Trenton"},
{"NM","New Mexico","Santa Fe"},
{"NY","New York","Albany"},
{"NC","North Carolina","Raleigh"},
{"ND","North Dakota","Bismarck"},
{"OH","Ohio","Columbus"},
{"OK","Oklahoma","Oklahoma City"},
{"OR","Oregon","Salem"},
{"PA","Pennsylvania","Harrisburg"},
{"RI","Rhode Island","Providence"},
{"SC","South Carolina","Columbia"},
{"SD","South Dakota","Pierre"},
{"TN","Tennessee","Nashville"},
{"TX","Texas","Austin"},
{"UT","Utah","Salt Lake City"},
{"VT","Vermont","Montpelier"},
{"VA","Virginia","Richmond"},
{"WA","Washington","Olympia"},
{"WV","West Virginia","Charleston"},
{"WI","Wisconsin","Madison"},
{"WY","Wyoming","Cheyenne"}
};
+105
View File
@@ -0,0 +1,105 @@
#include <cmoc.h>
#include <coco.h>
#include <Keyboard.h>
#include <font5x8.h>
#include <vcc/gime.h>
#include "ui.h"
#include "map_data.h"
static Keyboard keyboard;
static U8 initialized;
unsigned entropy=0xB41D;
void text(unsigned x,unsigned y,const char *s,U8 color)
{
U8 c,row,col,bits;
unsigned left=x;
while((c=(U8)*s++)!=0) {
if(c=='\n') {y+=9;x=left;continue;}
if(c<32 || c>126)c='?';
for(row=0;row<8;++row) {
bits=font5x8[(unsigned)(c-32)*8+row];
for(col=0;col<5;++col)
if(!(bits & (128>>col))) gime_plot(x+col,y+row,color);
}
x+=6;
}
}
void frame(const char *label)
{
gime_clear(0);
gime_fill_rect(0,0,320,13,1);
text(8,3,"CAPITAL QUEST",7);text(176,3,label,7);
gime_fill_rect(8,29,304,1,2);
}
static void spans(const U8 *data,const unsigned *off,U8 state,unsigned ox,unsigned oy)
{
U8 s,y,x,n,col;unsigned i,end;
for(s=0;s<50;++s) {
col=s==state?6:((s&1)?3:4);end=off[s+1];
for(i=off[s];i<end;i+=3) {
y=data[i];x=data[i+1];n=data[i+2];
gime_fill_rect(ox+x,oy+y,n,1,col);
}
}
}
void show_map(U8 state)
{
U8 zoom;
spans(national_spans,national_offsets,state,6,33);
text(8,134,"AK",2);text(62,134,"HI",2);
zoom=(state==6 || state==7 || state==18 || state==19 || state==20 ||
state==28 || state==29 || state==31 || state==37 || state==38 || state==44);
if(zoom) {
gime_fill_rect(209,32,103,111,1);
spans(northeast_spans,northeast_offsets,state,211,42);
text(214,33,"NORTHEAST",7);
/* Mark the enlarged region in the national overview. */
gime_fill_rect(158,44,42,1,6);gime_fill_rect(158,44,1,45,6);
gime_fill_rect(199,44,1,45,6);gime_fill_rect(158,88,42,1,6);
} else if(state==10) {
gime_fill_rect(209,32,103,111,1);
text(218,36,"HAWAII",7);
spans(hawaii_spans,hawaii_offsets,state,211,53);
} else {
text(218,52,"50 STATES",2);
text(218,71,"ONE JOURNEY",7);
gime_fill_rect(218,91,8,8,6);text(232,92,"FIND IT",7);
text(218,116,"AK / HI",2);
text(218,127,"INSETS",2);
}
}
static U8 any_key(void)
{
U8 c;
/* Probe all columns at once through the documented matrix API. Ignore
modifiers so Shift may remain held while typing consecutive letters. */
c=isKeyPressed(0,0x3F);
return c || isKeyPressed(KEY_PROBE_ENTER,KEY_BIT_ENTER) ||
isKeyPressed(KEY_PROBE_BREAK,KEY_BIT_BREAK) ||
isKeyPressed(KEY_PROBE_CLEAR,KEY_BIT_CLEAR);
}
void release_keys(void)
{
unsigned since;
if(!initialized){Keyboard_init(&keyboard);initialized=1;}
since=getTimer();
do {
Keyboard_poll(&keyboard);
if(any_key())since=getTimer();
} while((unsigned)(getTimer()-since)<2);
}
U8 next_key(void)
{
U8 c;
if(!initialized){Keyboard_init(&keyboard);initialized=1;}
do {
entropy=(entropy<<1) ^ (entropy>>15) ^ getTimer() ^ 0x1021;
c=Keyboard_poll(&keyboard);
}while(!c);
entropy^=(unsigned)c<<8;
return c;
}
void close_input(void)
{
if(initialized){Keyboard_shutdown(&keyboard);initialized=0;}
}
+28
View File
@@ -0,0 +1,28 @@
import json,re
from pathlib import Path
r=Path(__file__).resolve().parents[1]
states=[line.split('\t') for line in (r/'data/states.tsv').read_text().splitlines()]
assert len(states)==50 and len({s[0] for s in states})==50
assert len({s[1] for s in states})==50 and len({s[2] for s in states})==50
assert dict((s[0],s[2]) for s in states)['AK']=='Juneau'
assert dict((s[0],s[2]) for s in states)['HI']=='Honolulu'
assert all(s[0] not in ('DC','PR') for s in states)
m=json.loads((r/'data/map-manifest.json').read_text())
s=(r/'src/map_data.c').read_text()
for view in ('national','northeast','hawaii'):
data=list(map(int,re.search(view+r'_spans\[\] = \{\s*([\d,\s]+)',s)[1].replace('\n','').split(',')))
off=list(map(int,re.search(view+r'_offsets\[51\] = \{([\d,]+)',s)[1].split(',')))
assert len(off)==51 and off[0]==0 and off[-1]==len(data)
w,h=m[view]['size']; occupied=set()
for i,state in enumerate(states):
area=0
for k in range(off[i],off[i+1],3):
y,x,n=data[k:k+3];assert 0<=y<h and 0<=x<x+n<=w
for xx in range(x,x+n):assert (xx,y) not in occupied;occupied.add((xx,y))
area+=n
assert area==m[view]['pixels'][state[0]]
if view=='national':assert area>0
for code in ('CT','DE','ME','MD','MA','NH','NJ','NY','PA','RI','VT'):assert m['northeast']['pixels'][code]>0
assert m['hawaii']['pixels']['HI']>400
assert all(n==0 for code,n in m['hawaii']['pixels'].items() if code!='HI')
print('PASS: 50 unique pairs and geometry IDs, bounded/disjoint spans, all national masks, Northeast and Hawaii detail coverage.')
+65
View File
@@ -0,0 +1,65 @@
import struct,zlib,re,json,runpy,sys,uuid,os,tempfile
from pathlib import Path
ROOT=Path(__file__).resolve().parents[1]
EVIDENCE=Path(os.environ['CAPITAL_TEST_EVIDENCE'])
S=json.load(open(os.environ['CAPITAL_TEST_STATE']))
ART=next(Path(tempfile.gettempdir()).glob('vcc-c-project-*/Builds/'+S['artifact']['artifact_id']+'/build/CAPITAL.bin'))
mp=ART.with_suffix('.map').read_text()
addr=int(re.search(r'Symbol: _font5x8 .*?= ([0-9A-Fa-f]+)',mp)[1],16)
blob=ART.read_bytes();memory={};p=0
while p<len(blob):
t=blob[p];n,a=struct.unpack('>HH',blob[p+1:p+5]);p+=5
if t==255:break
for i,b in enumerate(blob[p:p+n]):memory[a+i]=b
p+=n
font=bytes(memory[addr+i] for i in range(768))
def png(path):
b=Path(path).read_bytes();p=8;dat=b''
while p<len(b):
n=int.from_bytes(b[p:p+4],'big');t=b[p+4:p+8];v=b[p+8:p+8+n];p+=n+12
if t==b'IHDR':w,h,depth,ct,*_=struct.unpack('>IIBBBBB',v)
if t==b'IDAT':dat+=v
assert depth==8 and ct in (2,6),(depth,ct)
channels=3 if ct==2 else 4;stride=w*channels;raw=zlib.decompress(dat);out=[];prior=bytearray(stride);p=0
for y in range(h):
f=raw[p];p+=1;row=bytearray(raw[p:p+stride]);p+=stride
for i in range(stride):
a=row[i-channels] if i>=channels else 0;b=prior[i];c=prior[i-channels] if i>=channels else 0
if f==1:pred=a
elif f==2:pred=b
elif f==3:pred=(a+b)//2
elif f==4:
v=a+b-c;pa=abs(v-a);pb=abs(v-b);pc=abs(v-c);pred=a if pa<=pb and pa<=pc else b if pb<=pc else c
else:pred=0
row[i]=(row[i]+pred)&255
out.append(row);prior=row
return w,h,channels,out
class Screen:
def __init__(self,path):self.w,self.h,self.ch,self.rows=png(path)
def pixel(self,x,y):return tuple(self.rows[y][x*self.ch:x*self.ch+3])
def guest(self,x,y):return self.pixel(x*2,50+y*2)
def text(self,x,y,n,color=None):
bg=self.guest(x+5,y);out=''
for j in range(n):
bits=[]
for row in range(8):
for col in range(5):bits.append(self.guest(x+j*6+col,y+row)==color if color else self.guest(x+j*6+col,y+row)!=bg)
scores=[]
for c in range(32,127):
expected=[not(font[(c-32)*8+r]&(128>>co)) for r in range(8) for co in range(5)]
scores.append((sum(a!=b for a,b in zip(bits,expected)),c))
d,c=min(scores);out+=chr(c) if d==0 else '?'
return out.rstrip()
def shuffle(seed=2709):
rng=seed
def rand(n):
nonlocal rng
while True:
x=rng;x^=x<<7;x&=65535;x^=x>>9;x^=x<<8;x&=65535;rng=x;x-=1
if x<65535-65535%n:return x%n
order=list(range(50))
for i in range(49,0,-1):j=rand(i+1);order[i],order[j]=order[j],order[i]
return order,rand
+41
View File
@@ -0,0 +1,41 @@
#!/usr/bin/env python3
"""Run real guest-input regression tests via an exported public VCC Plus grant.
Usage: python3 tests/playtest.py PRIVATE_GRANT --evidence /tmp/quiz-evidence
Requires C Assistant's Use Project Makefile and Allow Disposable Playtests.
"""
import argparse,json,os,runpy,sys,time,uuid
from pathlib import Path
ROOT=Path(__file__).resolve().parents[1]
sys.path.insert(0,str(ROOT/'tools'))
from vcc_mcp import VCC
p=argparse.ArgumentParser(description=__doc__)
p.add_argument('grant',type=Path);p.add_argument('--evidence',required=True,type=Path)
a=p.parse_args();out=a.evidence.resolve()
if out.is_relative_to(ROOT):p.error('Keep evidence outside the watched checkout until the run completes.')
out.mkdir(parents=True,exist_ok=True)
os.environ.update(VCC_GRANT=str(a.grant.resolve()),CAPITAL_TEST_EVIDENCE=str(out),CAPITAL_TEST_STATE=str(out/'session.json'))
v=VCC(a.grant)
c=v.call('get_capabilities');assert c.get('owned_playtests'),c
b=v.call('build_project',dict(project_id=c['project_id'],revision=c['revision'],action='disk',configuration='Test',request_id=str(uuid.uuid4())))
assert 'build_id' in b,b
for _ in range(150):
receipt=v.call('get_build',dict(build_id=b['build_id']))
if receipt.get('status')!='building':break
time.sleep(.2)
assert receipt.get('status')=='succeeded',receipt
(out/'build-receipt.json').write_text(json.dumps(receipt,indent=2))
r=v.call('start_playtest',dict(project_id=c['project_id'],revision=c['revision'],artifact_id=receipt['artifact_id'],request_id=str(uuid.uuid4())))
assert 'run_id' in r,r
state=dict(cap=c,build=b,artifact=receipt,run=r)
(out/'session.json').write_text(json.dumps(state))
v.call('playtest_input',dict(run_id=r['run_id'],request_id=str(uuid.uuid4()),steps=[dict(keys=[],fields=600)]))
v.close()
support=runpy.run_path(str(Path(__file__).with_name('playtest_support.py')))
support['capture'](r['run_id'],'title');support['v'].close()
runpy.run_path(str(Path(__file__).with_name('playtest_mc.py')),run_name='__main__')
runpy.run_path(str(Path(__file__).with_name('playtest_typed.py')),run_name='__main__')
state=json.loads((out/'session.json').read_text());v=VCC(a.grant)
for r in (state['run'],state['typed_run']):
result=v.call('stop_playtest',dict(run_id=r['run_id'],request_id=str(uuid.uuid4())))
(out/('retained-'+r['run_id']+'.json')).write_text(json.dumps(result,indent=2))
v.close();print('PASS: complete multiple-choice and typed regression suite. Evidence:',out)
+53
View File
@@ -0,0 +1,53 @@
import os
from pathlib import Path
import sys,runpy,json,re
sys.path.insert(0,str(Path(__file__).parent));from framebuffer import Screen,ROOT,shuffle,EVIDENCE
c=runpy.run_path(str(Path(__file__).with_name('playtest_support.py')));run=json.load(open(os.environ['CAPITAL_TEST_STATE']))['run']['run_id']
rows=[x.split('\t') for x in (ROOT/'data/states.tsv').read_text().splitlines()]
order,_=shuffle();evidence=[];score=0;pos=[0]*4
c['key'](run,'1',8,600)
for q,state in enumerate(order):
name=f'mc-q{q+1:02d}-{rows[state][0]}'
meta=c['capture'](run,name);scr=Screen(str(EVIDENCE)+'/'+name+'.png')
heading=scr.text(8,19,45);prompt=scr.text(8,145,50)
assert heading==f'Question {q+1} of 50 Score {score}',(q,heading,score)
assert prompt==f'{rows[state][1]}: what is its capital?',(q,prompt,rows[state])
opts=[scr.text(8+(i%2)*156,157+(i//2)*12,25)[2:] for i in range(4)]
assert len(set(opts))==4 and rows[state][2] in opts,(q,opts)
correctpos=opts.index(rows[state][2]);pos[correctpos]+=1
# Confirm selected state's actual framebuffer mask has the expected gold fill.
src=(ROOT/'src/map_data.c').read_text();d=list(map(int,re.search(r'national_spans\[\] = \{\s*([\d,\s]+)',src)[1].replace('\n','').split(',')));off=list(map(int,re.search(r'national_offsets\[51\] = \{([\d,]+)',src)[1].split(',')))
points=[(6+x,33+y) for k in range(off[state],off[state+1],3) for y,x0,n in [d[k:k+3]] for x in range(x0,x0+n)]
gold=sum(scr.guest(x,y)==(255,255,0) for x,y in points)
assert gold>=len(points)*.8,(q,rows[state][0],gold,len(points))
right=q%7!=0;selection=correctpos if right else (correctpos+1)%4
if right:score+=1
# Hold the first answer through feedback: it must not advance to question 2.
c['key'](run,str(selection+1),600 if q==0 else 8,450)
feedback=c['capture'](run,name+'-feedback');fs=Screen(str(EVIDENCE)+'/'+name+'-feedback.png')
assert fs.text(8,158,24)==('CORRECT!' if right else 'NOT THIS TIME.'),(q,fs.text(8,158,24))
assert fs.text(8,170,50)==f'The capital is {rows[state][2]}.',(q,fs.text(8,170,50))
evidence.append(dict(question=q+1,code=rows[state][0],state=rows[state][1],options=opts,answer=opts[selection],correct=right,score=score,gold_pixels=gold,expected_state_pixels=len(points),field=meta['field_clock']))
c['key'](run,'space',8,500)
print(q+1,rows[state][0],score,flush=True)
result=c['capture'](run,'mc-results');s=Screen(str(EVIDENCE)+'/mc-results.png')
assert s.text(8,48,45)==f'{score} / 50 correct {score*2}%',s.text(8,48,45)
assert s.text(8,70,45)=='0 correct after spelling correction',s.text(8,70,45)
assert score==42 and all(pos)
# Review all eight misses over three pages, preserving answers.
c['key'](run,'r',8,500)
misses=[x for x in evidence if not x['correct']]
for page in range(3):
c['capture'](run,f'mc-review-{page+1}');s=Screen(f'{EVIDENCE}/mc-review-{page+1}.png')
assert s.text(8,19,30)==f'Review page {page+1}'
for i,m in enumerate(misses[page*3:page*3+3]):
assert s.text(8,39+i*43,45)==m['state']
assert s.text(8,50+i*43,48)==f"You: {m['answer']}"
cap=next(x[2] for x in rows if x[0]==m['code'])
assert s.text(8,61+i*43,48)==f'Capital: {cap}'
if page<2:c['key'](run,'n',8,500)
c['key'](run,'b',8,500);c['key'](run,'p',8,500);c['capture'](run,'replay-title');c['key'](run,'q',8,200);final=c['capture'](run,'mc-exit')
assert 'screen_text' in final or final.get('screen_text_unavailable') is None,final
json.dump(dict(score=score,positions=pos,questions=evidence,run_id=run,artifact=result['artifact_id'],exit=final),open(str(EVIDENCE)+'/mc-report.json','w'),indent=2)
print('PASS complete multiple-choice quiz, all 50 masks, 42/50, review, held-key feedback, replay, exit.',flush=True)
c['v'].close()
+18
View File
@@ -0,0 +1,18 @@
import sys,json,base64,uuid,os
from pathlib import Path
sys.path.insert(0,str(Path(__file__).resolve().parents[1]/'tools'))
from vcc_mcp import VCC
v=VCC(os.environ['VCC_GRANT'])
def call(n,a={}):
r=v.call(n,a)
if r.get('isError'):raise RuntimeError(r)
return r
def capture(run,name):
r=v.request('tools/call',{'name':'capture_playtest','arguments':{'run_id':run}})
meta={}
for c in r['content']:
if c['type']=='image':(Path(os.environ['CAPITAL_TEST_EVIDENCE'])/(name+'.png')).write_bytes(base64.b64decode(c['data']))
if c['type']=='text':meta=json.loads(c['text'])
(Path(os.environ['CAPITAL_TEST_EVIDENCE'])/(name+'.json')).write_text(json.dumps(meta,indent=2));return meta
def inp(run,steps):return call('playtest_input',{'run_id':run,'request_id':str(uuid.uuid4()),'steps':steps})
def key(run,k,hold=8,settle=250):return inp(run,[{'keys':[k],'fields':hold},{'keys':[],'fields':settle}])
+81
View File
@@ -0,0 +1,81 @@
import os
from pathlib import Path
import runpy,json,sys,uuid
from pathlib import Path
sys.path.insert(0,str(Path(__file__).parent));from framebuffer import Screen,ROOT,shuffle,EVIDENCE
c=runpy.run_path(str(Path(__file__).with_name('playtest_support.py')));state=json.load(open(os.environ['CAPITAL_TEST_STATE']))
r=c['call']('start_playtest',dict(project_id=state['cap']['project_id'],revision=state['cap']['revision'],artifact_id=state['artifact']['artifact_id'],request_id=str(uuid.uuid4())))
run=r['run_id'];state['typed_run']=r;Path(os.environ['CAPITAL_TEST_STATE']).write_text(json.dumps(state))
rows=[x.split('\t') for x in (ROOT/'data/states.tsv').read_text().splitlines()];order,_=shuffle();report=[];score=corrections=0
def press(k,hold=4,settle=12):return c['key'](run,k,hold,settle)
def settle():c['inp'](run,[{'keys':[],'fields':600},{'keys':[],'fields':300}])
def cap(name):c['capture'](run,name);return Screen(str(EVIDENCE)+'/'+name+'.png')
def type_text(s):
steps=[]
for ch in s:
keys=['space'] if ch==' ' else ['shift',ch.lower()] if ch.isupper() else [ch]
steps.extend([dict(keys=keys,fields=4),dict(keys=[],fields=12)])
if len(steps)>=60:c['inp'](run,steps);steps=[]
if steps:c['inp'](run,steps)
def clear_input(n):
for start in range(0,n,25):c['inp'](run,[x for _ in range(min(25,n-start)) for x in [dict(keys=['left'],fields=4),dict(keys=[],fields=12)]])
settle();c['key'](run,'2',8,600);settle();c['inp'](run,[dict(keys=['shift','0'],fields=8),dict(keys=[],fields=12)])
# First alias in mixed case. Capture input before submission to verify the real keys.
type_text('sT pAuL');s=cap('typed-alias-input');print('input=',s.text(8,158,45),flush=True)
assert s.text(8,158,45)=='sT pAuL_',s.text(8,158,45)
press('enter',8,600);s=cap('typed-alias-feedback');assert s.text(8,158,30)=='CORRECT!',s.text(8,158,30)
score=1;report.append(dict(question=1,code='MN',answer='sT pAuL',correct=True,correction=False));c['key'](run,'space',8,600);settle()
for q in range(1,50):
st=order[q];code,name,capital=rows[st];s=cap(f'typed-q{q+1:02d}-{code}')
assert s.text(8,19,45)==f'Question {q+1} of 50 Score {score}',(q,s.text(8,19,45),score)
assert s.text(8,145,50)==name+': what is its capital?'
spelling=False;right=True
if q==1 or code=='CO':
# Adjacent transpositions, followed by a real Backspace correction.
answer='Chalreston' if q==1 else 'Dnever';type_text(answer);press('enter',8,600)
s=cap('typed-near-'+code)
assert s.text(8,158,48)=='That looks close. Check your spelling'
assert s.text(8,182,35)=='No point awarded yet.'
assert s.text(8,19,45)==f'Question {q+1} of 50 Score {score}'
c['key'](run,'r',8,600);settle();clear_input(len(answer));type_text(capital);spelling=True
elif q==2:
answer='Austin';type_text(answer);right=False
elif q==3:
answer='X'*39;type_text('X'*45);settle();s=cap('typed-long-input')
assert s.text(8,158,45)=='X'*39+'_',s.text(8,158,45)
assert s.text(8,171,48)=='39 characters maximum. Backspace to edit.'
right=False
elif q==4:
answer='Tallhassee';type_text(answer);press('enter',8,600);s=cap('typed-near-reveal')
assert s.text(8,158,48)=='That looks close. Check your spelling'
c['key'](run,'v',8,600);right=False
elif q==5:
answer=' bAtOn rOuGe ';type_text(answer)
else:
answer=capital.lower() if q%3==0 else capital.upper() if q%3==1 else ''.join(ch.lower() if i%2 else ch.upper() for i,ch in enumerate(capital))
type_text(answer)
if q!=4:press('enter',8,600)
s=cap(f'typed-feedback-{q+1:02d}')
assert s.text(8,158,30)==('CORRECT!' if right else 'NOT THIS TIME.'),(q,s.text(8,158,30),answer)
assert s.text(8,170,50)==f'The capital is {capital}.'
if right:score+=1
if spelling:corrections+=1
report.append(dict(question=q+1,code=code,answer=answer,correct=right,correction=spelling))
c['key'](run,'space',8,600)
if q!=49:settle()
print(q+1,code,score,corrections,flush=True)
s=cap('typed-results');assert s.text(8,48,48)==f'{score} / 50 correct {score*2}%',s.text(8,48,48)
assert s.text(8,70,48)==f'{corrections} correct after spelling correction'
assert score==47 and corrections==2
c['key'](run,'r',8,600);s=cap('typed-review')
misses=[x for x in report if not x['correct']]
for i,m in enumerate(misses):
name,capital=next((r[1],r[2]) for r in rows if r[0]==m['code'])
assert s.text(8,39+i*43,48)==name
assert s.text(8,50+i*43,48)=='You: '+m['answer']
assert s.text(8,61+i*43,48)=='Capital: '+capital
c['key'](run,'b',8,600);c['key'](run,'q',8,300);final=c['capture'](run,'typed-exit')
assert final.get('screen_text_unavailable') is None
json.dump(dict(score=score,corrections=corrections,questions=report,run_id=run,exit=final),open(str(EVIDENCE)+'/typed-report.json','w'),indent=2)
print('PASS full typed quiz: casing, spaces, alias, transpositions, corrected spelling, wrong capital, long input, reveal, score/review/exit.',flush=True);c['v'].close()
+48
View File
@@ -0,0 +1,48 @@
#include <assert.h>
#include <stdio.h>
#include <string.h>
#include "quiz.h"
static unsigned index_of(const char *code){unsigned i;for(i=0;i<50;++i)if(!strcmp(states[i].code,code))return i;assert(0);return 0;}
int main(void)
{
unsigned seed,i,j,p,positions[4]={0},last[50],changes=0;
char a[160],b[ANSWER_SIZE];
for(seed=1;seed<=2000;++seed){
unsigned seen[50]={0};quiz_start(seed);
for(i=0;i<50;++i){
assert(order[i]<50);++seen[order[i]];quiz_options(order[i]);p=0;
for(j=0;j<4;++j){unsigned k;assert(options[j]<50);if(options[j]==order[i]){++p;++positions[j];}for(k=0;k<j;++k)assert(options[k]!=options[j]);}
assert(p==1);if(seed>1 && last[i]!=order[i])++changes;last[i]=order[i];
}
for(i=0;i<50;++i)assert(seen[i]==1);
}
for(i=0;i<4;++i)assert(positions[i]>20000);
assert(changes>90000);
for(i=0;i<50;++i){
assert(classify(i,states[i].capital)==2);
strcpy(a,states[i].capital);
for(j=0;a[j];++j)if(a[j]>='a' && a[j]<='z')a[j]-=32;
assert(classify(i,a)==2);
for(j=0;a[j];++j)if((j&1) && a[j]>='A' && a[j]<='Z')a[j]+=32;
assert(classify(i,a)==2);
for(j=0;j<50;++j)if(j!=i)assert(classify(i,states[j].capital)==0);
}
assert(classify(index_of("MN"),"St. Paul")==2);
assert(classify(index_of("MN"),"st paul")==2);
assert(classify(index_of("MN")," sAiNt PaUl ")==2);
assert(classify(index_of("UT")," salt lake city ")==2);
assert(classify(index_of("CO"),"Dnever")==1);
assert(classify(index_of("AK"),"Juneu")==1);
assert(classify(index_of("MA"),"Austin")==0);
assert(classify(index_of("CO"),"")==0);
memset(a,'x',159);a[159]=0;assert(classify(0,a)==0);
normalize(" \t baton ROUGE \n ",b);assert(!strcmp(b,"baton rouge"));
quiz_start(2709);
for(i=0;i<50;++i){quiz_record(order[i],i%2?"wrong":states[order[i]].capital,!(i%2),!(i%4));quiz_record(order[i],"duplicate",1,1);}
assert(score==25 && corrections==13);
for(i=0;i<50;++i)assert(answered[i]==1);
quiz_start(2710);assert(score==0 && corrections==0);
for(i=0;i<50;++i)assert(!answered[i] && !responses[i][0]);
printf("PASS: 2000 shuffles, 100000 option sets, all casing / known-wrong capitals, aliases, distance, bounds, scoring, reset.\n");
return 0;
}
+80
View File
@@ -0,0 +1,80 @@
// autostart.c - Program to be run by the Disk Basic DOS command.
// By Pierre Sarrazin <http://sarrazip.com/>
// This file is in the public domain.
//
// Reference: Roger Schrag, "A Special Use For The DOS Command",
// The Rainbow, November 1984, p.140.
//
// To compile: cmoc --dos autostart.c
// To install on CoCo disk image: install-coco-boot-loader some-image.dsk autostart.bin
// To run on CoCo: type DOS and <Enter> to automatically run *.BAS.
//
// Version history:
// 0.1.0 2016-01-16 Use of legacy.h discontinued.
// 0.1.1 2018-04-03 Adapted to CMOC 0.1.51 (const).
// 0.1.2 2018-08-04 Basic line now forced to be uppercase.
#include <coco.h>
#define ENDFLG 0x00 // STOP/END FLAG: POSITIVE=STOP, NEG=END
#define CINBFL 0x70 // CONSOLE IN BUFFER FLAG: 00=NOT EMPTY, $FF=EMPTY
#define RVEC4 0x016a // RAM hook: CONSOLE IN
byte oldHookInstr;
word oldHookAddr;
const char *basicLineReader;
void feedKeyboard()
{
word preservedX;
asm("stx", preservedX);
* (byte *) CINBFL = 0; // console in buffer now not empty
char nextBasicByte = (char) toupper(*basicLineReader);
++basicLineReader;
if (nextBasicByte == 0) // if finished returning Basic line
{
* (byte *) RVEC4 = oldHookInstr;
* (word *) (RVEC4 + 1) = oldHookAddr;
nextBasicByte = '\r'; // return "Enter" to cause execution of Basic line
}
asm {
lda nextBasicByte
ldx preservedX
tfr u,s // discard stack frame
leas 4,s // discard previous stack frame ptr and return addr
rts // return to caller of CONSOLE IN
}
}
int main()
{
* (byte *) ENDFLG = - * (byte *) ENDFLG; // why?
basicLineReader =
#ifndef COMMAND
"LOADM\"CAPITAL.BIN\":EXEC"
#else
COMMAND
#endif
;
// Install function feedKeyboard() as CONSOLE IN routine.
//
oldHookInstr = * (byte *) RVEC4;
oldHookAddr = * (word *) (RVEC4 + 1);
* (byte *) RVEC4 = 0x7e; // JMP instruction
* (void **) (RVEC4 + 1) = (void *) feedKeyboard;
* (word *) 0x2600 = 0; // overwrite "OS" marker with two null bytes
asm("jmp", "$ac7c"); // go interpret a Basic line (which is read from console)
return 0; // avoids compiler error
}
+154
View File
@@ -0,0 +1,154 @@
#!/usr/bin/env python3
"""Offline, standard-library-only conversion of Fla-shop SVG to identity spans.
SVG input uses straight M/L/H/V/Z paths. Flood regions at original resolution,
associate via documented seed coordinates, then reduce to guest scanline runs.
"""
import collections, json, math, re, struct, zlib
from pathlib import Path
import xml.etree.ElementTree as ET
ROOT=Path(__file__).resolve().parents[1]
W,H=2000,1200
rows=[s.split('\t') for s in (ROOT/'data/states.tsv').read_text().splitlines()]
assert len(rows)==50 and len({r[0] for r in rows})==50
ids={r[0]:i+1 for i,r in enumerate(rows)}
def paths(d):
tok=re.findall(r'[MmLlHhVvZz]|[-+]?(?:\d*\.\d+|\d+)(?:[eE][-+]?\d+)?',d)
i=0;x=y=0;out=[];poly=[];cmd=''
while i<len(tok):
if tok[i].isalpha():
cmd=tok[i];i+=1
if cmd.lower()=='z':
if poly:poly.append(poly[0]);out.append(poly);poly=[]
x,y=out[-1][0];continue
rel=cmd.islower(); c=cmd.lower()
if c in ('m','l'):
a,b=map(float,tok[i:i+2]);i+=2
x,y=(x+a,y+b) if rel else (a,b)
if c=='m':
if poly:out.append(poly)
poly=[];cmd='l' if rel else 'L'
elif c=='h':
a=float(tok[i]);i+=1;x=x+a if rel else a
elif c=='v':
a=float(tok[i]);i+=1;y=y+a if rel else a
else:raise ValueError(cmd)
poly.append((x,y))
if poly:out.append(poly)
return out
def png(path,w,h,pixels):
def chunk(tag,b):return struct.pack('>I',len(b))+tag+b+struct.pack('>I',zlib.crc32(tag+b)&0xffffffff)
raw=b''.join(b'\0'+bytes(pixels[y*w*3:(y+1)*w*3]) for y in range(h))
path.write_bytes(b'\x89PNG\r\n\x1a\n'+chunk(b'IHDR',struct.pack('>IIBBBBB',w,h,8,2,0,0,0))+chunk(b'IDAT',zlib.compress(raw))+chunk(b'IEND',b''))
def main():
svg=ET.parse(ROOT/'assets/usa-source.svg').getroot()
elements={e.get('id'):e for e in svg.iter() if e.get('id')}
land=bytearray(W*H)
outline=paths(elements['outline'].get('d'))
# Even-odd scan conversion, coast and islands included.
edges=[(a,b) for p in outline for a,b in zip(p,p[1:]+p[:1]) if a[1]!=b[1]]
buckets=[[] for _ in range(H)]
for a,b in edges:
for y in range(max(0,math.ceil(min(a[1],b[1])-.5)),min(H,math.ceil(max(a[1],b[1])-.5))):
buckets[y].append(a[0]+(y+.5-a[1])*(b[0]-a[0])/(b[1]-a[1]))
for y,xx in enumerate(buckets):
xx.sort()
for a,b in zip(xx[::2],xx[1::2]):
lo=max(0,math.ceil(a-.5));hi=min(W,math.ceil(b-.5));land[y*W+lo:y*W+hi]=b'\1'*(hi-lo)
coast=bytearray(land)
# Three-source-pixel boundary stroke closes subpixel joins before flood fill.
for p in paths(elements['boundaries'].get('d')):
for a,b in zip(p,p[1:]):
n=max(1,math.ceil(max(abs(a[0]-b[0]),abs(a[1]-b[1]))))
for t in range(n+1):
x=round(a[0]+(b[0]-a[0])*t/n);y=round(a[1]+(b[1]-a[1])*t/n)
for yy in range(max(0,y-1),min(H,y+2)):
for xx in range(max(0,x-1),min(W,x+2)):land[yy*W+xx]=0
seeds={}
for e in svg.iter():
if e.tag.endswith('tspan'):
ab=''.join(e.itertext()).strip()
if ab in ids:seeds[ab]=[round(float(e.get('x'))+15),round(float(e.get('y'))-12)]
# Callout labels are outside their states. Seed actual interiors instead.
seeds.update({'VT':[1800,280],'NH':[1840,280],'MA':[1830,340],
'RI':[1860,360],'CT':[1830,375],'NJ':[1780,440],
'DE':[1764,509],'MD':[1720,536],'HI':[739,1130]})
seeds.update(json.loads((ROOT/'data/map-seeds.json').read_text()) if (ROOT/'data/map-seeds.json').exists() else {})
owners=bytearray(W*H);claimed={};counts={}
for ab,(x,y) in seeds.items():
start=y*W+x
assert land[start],(ab,'seed is not land',x,y)
assert not owners[start],(ab,'shares component with',claimed.get(owners[start]))
val=ids[ab];q=collections.deque([start]);owners[start]=val;count=0
while q:
pos=q.popleft();count+=1
for nxt in (pos-1,pos+1,pos-W,pos+W):
if 0<=nxt<W*H and land[nxt] and not owners[nxt]:owners[nxt]=val;q.append(nxt)
claimed[val]=ab;counts[ab]=count
# Unassigned land = detached islands/peninsulas: nearest assigned land,
# using a multi-source breadth-first expansion. The source mask is retained.
q=collections.deque(i for i in range(W*H) if owners[i] and any(0<=j<W*H and not owners[j] for j in (i-1,i+1,i-W,i+W)))
nearest=bytearray(owners)
while q:
p=q.popleft()
for n in (p-1,p+1,p-W,p+W):
if 0<=n<W*H and not nearest[n]:nearest[n]=nearest[p];q.append(n)
# Detached Alaska/Hawaii insets and Michigan's Upper Peninsula require
# explicit geographic regions; proximity alone mislabels small islands.
# Assign detached original land by geographic ownership, not nearest capital.
for y in range(H):
for x in range(W):
p=y*W+x
if land[p] and not owners[p]:
if 560<x<785 and 995<y<1190:owners[p]=ids['HI']
elif x<560 and y>850:owners[p]=ids['AK']
elif 1175<x<1465 and 180<y<330:owners[p]=ids['MI']
else:owners[p]=nearest[p]
(ROOT/'data/map-seeds.json').write_text(json.dumps(seeds,indent=2)+'\n')
# Three views share the exact same owner raster and stable TSV IDs.
views=[('national',200,110,(0,0,2000,1200)),('northeast',100,100,(1540,120,1980,600)),('hawaii',100,82,(565,995,785,1185))]
arrays=[];meta={};preview=[]
for name,w,h,(x0,y0,x1,y1) in views:
small=[]
for y in range(h):
for x in range(w):
# Sample one source interior pixel at pixel center.
sx=int(x0+(x+.5)*(x1-x0)/w);sy=int(y0+(y+.5)*(y1-y0)/h)
small.append((owners[sy*W+sx] or nearest[sy*W+sx]) if coast[sy*W+sx] else 0)
if name=='hawaii':small=[v if v==ids['HI'] else 0 for v in small]
# One guest pixel on the right/bottom of a state seam gives continuous
# boundaries. Preserve tiny national masks; their detail view is larger.
areas=collections.Counter(small); original=small[:]
for y in range(h-1):
for x in range(w-1):
pos=y*w+x;val=original[pos]
if val and areas[val]>8 and any(v and v!=val for v in (original[pos+1],original[pos+w])):
small[pos]=0
spans=[];offsets=[0];total={}
for val in range(1,51):
cnt=0
for y in range(h):
x=0
while x<w:
if small[y*w+x]!=val:x+=1;continue
first=x
while x<w and small[y*w+x]==val:x+=1
spans.extend([y,first,x-first]);cnt+=x-first
offsets.append(len(spans));total[rows[val-1][0]]=cnt
arrays.append('const unsigned char '+name+'_spans[] = {\n'+','.join(map(str,spans))+'\n};\nconst unsigned '+name+'_offsets[51] = {'+','.join(map(str,offsets))+'};\n')
meta[name]={'size':[w,h],'source_box':[x0,y0,x1,y1],'pixels':total,'bytes':len(spans)+102}
colors=[(8,19,34),(44,116,142),(73,145,155),(103,164,169),(36,92,126)]
pix=[]
for v in small:pix.extend(colors[0] if not v else colors[1+(v%4)])
png(ROOT/'assets'/('preview-'+name+'.png'),w,h,pix)
assert all(meta['national']['pixels'].values()),meta['national']['pixels']
(ROOT/'src/map_data.c').write_text('/* Adapted from Fla-shop.com, CC BY 4.0. See assets/CREDITS.md. */\n#include "map_data.h"\n'+''.join(arrays))
(ROOT/'include/map_data.h').write_text('\n'.join('extern const unsigned char '+n+'_spans[];\nextern const unsigned '+n+'_offsets[51];' for n,*_ in views)+'\n')
(ROOT/'src/states.c').write_text('#include "quiz.h"\nconst State states[50] = {\n'+',\n'.join('{"%s","%s","%s"}'%tuple(r) for r in rows)+'\n};\n')
meta['source_component_pixels']=counts
(ROOT/'data/map-manifest.json').write_text(json.dumps(meta,indent=2)+'\n')
print({n:meta[n]['bytes'] for n,*_ in views})
if __name__=='__main__':main()
+39
View File
@@ -0,0 +1,39 @@
#!/usr/bin/env python3
"""Minimal JSON-RPC client for the installed VCC Plus public STDIO MCP helper.
No grant contents, private sockets, memory mutation or emulator internals used.
"""
import json,subprocess,sys
from pathlib import Path
HELPER='/Applications/VCC Plus.app/Contents/Helpers/vcc-mcp'
class VCC:
def __init__(self,grant):
self.p=subprocess.Popen([HELPER,'--grant',str(grant)],stdin=subprocess.PIPE,stdout=subprocess.PIPE,stderr=subprocess.PIPE,text=True,bufsize=1)
self.i=0
self.request('initialize',{'protocolVersion':'2024-11-05','capabilities':{},'clientInfo':{'name':'capital-quiz-tests','version':'1.0'}})
self.p.stdin.write(json.dumps({'jsonrpc':'2.0','method':'notifications/initialized'})+'\n');self.p.stdin.flush()
def request(self,method,params):
self.i+=1
self.p.stdin.write(json.dumps({'jsonrpc':'2.0','id':self.i,'method':method,'params':params})+'\n');self.p.stdin.flush()
while True:
line=self.p.stdout.readline()
if not line:raise RuntimeError(self.p.stderr.read())
reply=json.loads(line)
if reply.get('id')==self.i:
if 'error' in reply:raise RuntimeError(reply['error'])
return reply['result']
def call(self,name,args=None):
r=self.request('tools/call',{'name':name,'arguments':args or {}})
for b in r.get('content',[]):
if b.get('type')=='text':
try:return json.loads(b['text'])
except ValueError:pass
return r
def close(self):
self.p.stdin.close();self.p.terminate();self.p.wait()
if __name__=='__main__':
v=VCC(sys.argv[1])
try:
if len(sys.argv)<3:result=v.request('tools/list',{})
else:result=v.call(sys.argv[2],json.loads(sys.argv[3]) if len(sys.argv)>3 else {})
print(json.dumps(result,indent=2))
finally:v.close()
+34
View File
@@ -0,0 +1,34 @@
{
"binary": "build/CAPITAL.bin",
"diskImage": "build/CAPITAL.dsk",
"buildTarget": "disk",
"diskTarget": "disk",
"cleanTarget": "clean",
"entrySource": "main.c",
"makefile": "Makefile",
"jobs": 4,
"launchMode": "disk",
"launchCommands": [
"DOS"
],
"configurations": [
{
"name": "Release",
"makeArguments": [
"VCC_CONFIGURATION=Release"
]
},
{
"name": "Debug",
"makeArguments": [
"VCC_CONFIGURATION=Debug"
]
},
{
"name": "Test",
"makeArguments": [
"VCC_CONFIGURATION=Test"
]
}
]
}