From 4cedb2d94ac8dc531c29a1310c1fcafdea0a6943 Mon Sep 17 00:00:00 2001 From: Brian Holman Date: Mon, 9 Nov 2026 23:39:21 -0700 Subject: [PATCH] Import coco-letters 0.1.0 upstream source snapshot Original author: Pierre Sarrazin. Preserve upstream GPLv3-or-later and file-specific notices. Source: http://sarrazip.com/dev/coco-letters-0.1.0.tar.gz Archive SHA-256: ad7c7771845e1a35014644fb562634a558abee632e1d7738683db6e9e9e46b94 --- COPYING | 674 +++ CursorBlinker.c | 47 + CursorBlinker.h | 53 + GamePlayer.c | 38 + GamePlayer.h | 38 + GameState.c | 597 ++ GameState.h | 170 + HACKING.md | 128 + Makefile | 205 + PositionIterator.c | 47 + PositionIterator.h | 48 + README.md | 36 + WordSearch.c | 238 + WordSearch.h | 66 + autostart.c | 80 + board.h | 32 + build-data.pl | 388 ++ defs.h | 176 + dict.c | 413 ++ dict.h | 88 + file.c | 35 + file.h | 28 + font4x8-ascii.c | 108 + font5x8-A-Z.c | 38 + graphics.c | 528 ++ graphics.h | 154 + main.c | 2084 +++++++ palette.h | 35 + word-list.txt | 13597 +++++++++++++++++++++++++++++++++++++++++++ 29 files changed, 20169 insertions(+) create mode 100644 COPYING create mode 100644 CursorBlinker.c create mode 100644 CursorBlinker.h create mode 100644 GamePlayer.c create mode 100644 GamePlayer.h create mode 100644 GameState.c create mode 100644 GameState.h create mode 100644 HACKING.md create mode 100644 Makefile create mode 100644 PositionIterator.c create mode 100644 PositionIterator.h create mode 100644 README.md create mode 100644 WordSearch.c create mode 100644 WordSearch.h create mode 100644 autostart.c create mode 100644 board.h create mode 100644 build-data.pl create mode 100644 defs.h create mode 100644 dict.c create mode 100644 dict.h create mode 100644 file.c create mode 100644 file.h create mode 100644 font4x8-ascii.c create mode 100644 font5x8-A-Z.c create mode 100644 graphics.c create mode 100644 graphics.h create mode 100644 main.c create mode 100644 palette.h create mode 100644 word-list.txt diff --git a/COPYING b/COPYING new file mode 100644 index 0000000..94a9ed0 --- /dev/null +++ b/COPYING @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + 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. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +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: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +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 +. + + 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 +. diff --git a/CursorBlinker.c b/CursorBlinker.c new file mode 100644 index 0000000..4bb026d --- /dev/null +++ b/CursorBlinker.c @@ -0,0 +1,47 @@ +/* CursorBlinker.c + Copyright (C) 2026 Pierre Sarrazin + + 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 . +*/ + +#include "CursorBlinker.h" + + +void +CursorBlinker_init(CursorBlinker *cb, word *timer) +{ + cb->isDisplayed = FALSE; + cb->currentColorIndex = 0xFF; // invalid color index + cb->origColorIndex = 0xFF; + cb->timer = timer; +} + + +BOOL +CursorBlinker_updateFromTimer(CursorBlinker *cb, byte onColorIndex) +{ + cb->newColorIndex = (*cb->timer & 0b11110000) ? onColorIndex : cb->origColorIndex; + return cb->newColorIndex != cb->currentColorIndex; +} + + +void +CursorBlinker_updateAfterChange(CursorBlinker *cb, + byte colorIndexPreviouslyUnderCursor) +{ + if (cb->origColorIndex == 0xFF) // remember the original background color + cb->origColorIndex = colorIndexPreviouslyUnderCursor; + cb->isDisplayed ^= 1; + cb->currentColorIndex = cb->newColorIndex; +} diff --git a/CursorBlinker.h b/CursorBlinker.h new file mode 100644 index 0000000..d2fba00 --- /dev/null +++ b/CursorBlinker.h @@ -0,0 +1,53 @@ +/* CursorBlinker.h + Copyright (C) 2026 Pierre Sarrazin + + 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 . +*/ + +#ifndef _H_CursorBlinker +#define _H_CursorBlinker + +#include + + +typedef struct CursorBlinker +{ + BOOL isDisplayed; + byte currentColorIndex; + byte origColorIndex; + byte newColorIndex; + word *timer; +} CursorBlinker; + + +// timer: Must point to a word that gets incremented every 60th of a second. +// *timer gets overwritten. +// Does not initializer cb->newColorIndex. +// +void CursorBlinker_init(CursorBlinker *cb, word *timer); + + +// Reads the timer designated to CursorBlinker_init(). +// Overwrites cb->newColorIndex. +// Returns TRUE if newColorIndex has been changed by this call. +// In such a case, the caller should draw the cursor in that color. +// +BOOL CursorBlinker_updateFromTimer(CursorBlinker *cb, byte onColorIndex); + + +void CursorBlinker_updateAfterChange(CursorBlinker *cb, + byte colorIndexPreviouslyUnderCursor); + + +#endif /* _H_CursorBlinker */ diff --git a/GamePlayer.c b/GamePlayer.c new file mode 100644 index 0000000..d1fa80c --- /dev/null +++ b/GamePlayer.c @@ -0,0 +1,38 @@ +/* GamePlayer.c + Copyright (C) 2026 Pierre Sarrazin + + 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 . +*/ + +#include "GamePlayer.h" + + +void +GamePlayer_init(GamePlayer *player, BOOL isComputer) +{ + player->isComputer = isComputer; + memset(player->rack, TILE_TYPE_NONE, RACK_SIZE); // empty rack + player->score = 0; +} + + +BOOL +GamePlayer_isRackEmpty(const GamePlayer *player) +{ + const byte *p = player->rack; + for (byte i = 0; i < RACK_SIZE; ++i, ++p) + if (*p != TILE_TYPE_NONE) + return FALSE; + return TRUE; +} diff --git a/GamePlayer.h b/GamePlayer.h new file mode 100644 index 0000000..a3223c6 --- /dev/null +++ b/GamePlayer.h @@ -0,0 +1,38 @@ +/* GamePlayer.h + Copyright (C) 2026 Pierre Sarrazin + + 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 . +*/ + +#ifndef _H_GamePlayer +#define _H_GamePlayer + +#include "defs.h" + + +typedef struct GamePlayer +{ + BOOL isComputer; // FALSE means user + byte rack[RACK_SIZE]; // array of 1..26, TILE_TYPE_BLANK or TILE_TYPE_NONE + word score; +} GamePlayer; + + +void GamePlayer_init(GamePlayer *player, BOOL isComputer); + + +BOOL GamePlayer_isRackEmpty(const GamePlayer *player); + + +#endif /* _H_GamePlayer */ diff --git a/GameState.c b/GameState.c new file mode 100644 index 0000000..036c016 --- /dev/null +++ b/GameState.c @@ -0,0 +1,597 @@ +/* GameState.c + Copyright (C) 2026 Pierre Sarrazin + + 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 . +*/ + +#include "GameState.h" + +#include "dict.h" + + +// Represents a tile. +// +typedef struct LetterSpec +{ + byte numTiles; // number of tiles of this letter + byte numPoints; // points scored when playing this letter +} LetterSpec; + + +// Tile numbers: +// 0 = blank; +// 1..26 = A..Z. +// +static const LetterSpec letterSpecs[NUM_TILE_TYPES] = +{ + { NUM_BLANK_TILES, 0 }, + { 9, 1 }, // A + { 2, 3 }, // B + { 2, 3 }, // C + { 4, 2 }, // D + { 12, 1 }, // E + { 2, 4 }, // F + { 3, 2 }, // G + { 2, 4 }, // H + { 9, 1 }, // I + { 1, 8 }, // J + { 1, 5 }, // K + { 4, 1 }, // L + { 2, 3 }, // M + { 6, 1 }, // N + { 8, 1 }, // O + { 2, 3 }, // P + { 1, 10 }, // Q + { 6, 1 }, // R + { 4, 1 }, // S + { 6, 1 }, // T + { 4, 1 }, // U + { 2, 4 }, // V + { 2, 4 }, // W + { 1, 8 }, // X + { 2, 4 }, // Y + { 1, 10 }, // Z +}; + + +#define _ SQ_EMPTY, +#define S SQ_START, +#define T SQ_TRIPLE_WORD, +#define D SQ_DOUBLE_WORD, +#define t SQ_TRIPLE_LETTER, +#define d SQ_DOUBLE_LETTER, +#define EOL }, { +#define EOB } + +const byte GameState_boardSquareTypes[BOARD_SIZE][BOARD_SIZE] = +{ + { + #include "board.h" + } +}; + +#undef _ +#undef S +#undef T +#undef D +#undef t +#undef d +#undef EOL +#undef EOB + + +void +GameState_init(GameState *gs) +{ + for (byte i = 0; i < NUM_TILE_TYPES; ++i) + gs->numTiles[i] = letterSpecs[i].numTiles; + memset(gs->boardTiles, (char) TILE_TYPE_NONE, BOARD_SIZE * (size_t) BOARD_SIZE); + gs->isBoardEmpty = TRUE; + gs->numPlayedBlankTiles = 0; +} + + +byte +GameState_getNumTilesOfType(const GameState *gs, byte tileType) +{ + if (tileType > 26) // if TILE_TYPE_NONE or invalid + return 0; + return letterSpecs[tileType].numTiles; +} + + +byte +GameState_getTileValue(const GameState *gs, byte tileType) +{ + if (tileType > 26) // if TILE_TYPE_NONE or invalid + return 0; + return letterSpecs[tileType].numPoints; +} + + +byte +GameState_getBlankTileLetter(const GameState *gs, byte row, byte col) +{ + for (byte i = gs->numPlayedBlankTiles; i--; ) + { + const PlayedBlankTile *p = &gs->playedBlankTiles[i]; + if (p->row == row && p->col == col) + return p->letterTileType; + } + return TILE_TYPE_NONE; +} + + +void +GameState_setTile(GameState *gs, byte row, byte col, + byte tileType, byte letterTileTypeIfBlank) +{ + // If tileType is TILE_TYPE_BLANK, then letterTileTypeIfBlank must be A..Z. + // Otherwise, letterTileTypeIfBlank is not used and should be TILE_TYPE_NONE. + // + assert(tileType != TILE_TYPE_BLANK || letterTileTypeIfBlank >= 1 && letterTileTypeIfBlank <= 26); + assert(tileType == TILE_TYPE_BLANK || letterTileTypeIfBlank == TILE_TYPE_NONE); + + gs->boardTiles[row][col] = tileType; + gs->isBoardEmpty = FALSE; + if (tileType == TILE_TYPE_BLANK && gs->numPlayedBlankTiles < NUM_BLANK_TILES) + { + PlayedBlankTile *p = &gs->playedBlankTiles[gs->numPlayedBlankTiles]; + p->row = row; + p->col = col; + p->letterTileType = letterTileTypeIfBlank; + ++gs->numPlayedBlankTiles; + } +} + + +byte +GameState_countTilesInBag(const GameState *gs) +{ + //printf("GameState_countTilesInBag:"); + byte total = 0; + for (byte i = 0; i < NUM_TILE_TYPES; ++i) + { + //printf(" %u=%u", i, gs->numTiles[i]); + total += gs->numTiles[i]; + } + //printf("; total=%u\n", total); + return total; +} + + +byte +GameState_pickRandomLetter(GameState *gs) +{ + byte numTiles = GameState_countTilesInBag(gs); + if (numTiles == 0) + return TILE_TYPE_NONE; + byte chosenTileIndex = (byte) (rand() % numTiles); // index among all tiles in bag + //printf("GameState_pickRandomLetter: chosenTileIndex=%u\n", chosenTileIndex); + for (byte i = 0; i < NUM_TILE_TYPES; ++i) + { + byte *numTilesOfTypeI = &gs->numTiles[i]; + if (chosenTileIndex < *numTilesOfTypeI) + { + --*numTilesOfTypeI; + //printf("GameState_pickRandomLetter: return %u\n", i); + return i; + } + chosenTileIndex -= *numTilesOfTypeI; + } + return TILE_TYPE_NONE; +} + + +void +GameState_fillRackEmptySlots(GameState *gs, byte rack[RACK_SIZE]) +{ + for (byte i = 0; i < RACK_SIZE; ++i) + if (rack[i] == TILE_TYPE_NONE) + rack[i] = GameState_pickRandomLetter(gs); +} + + +// Returns TRUE if the required free space exists. +// +static BOOL +GameState_checkFreeSpaceLeft(const GameState *gs, + byte row, byte col, + byte numFreeSquaresNeededForNewWord) +{ + if (col < numFreeSquaresNeededForNewWord) // not enough columns at left of (row, col) + return FALSE; + for ( ; numFreeSquaresNeededForNewWord > 0; --numFreeSquaresNeededForNewWord) + { + --col; + if (gs->boardTiles[row][col] != TILE_TYPE_NONE) + return FALSE; + } + if (col == 0) + return TRUE; + // One more free space is needed to keep the new word from touching an existing word. + return gs->boardTiles[row][col - 1] == TILE_TYPE_NONE; +} + + +// Returns TRUE if the required free space exists. +// +static BOOL +GameState_checkFreeSpaceRight(const GameState *gs, + byte row, byte col, + byte numFreeSquaresNeededForNewWord) +{ + if (col + numFreeSquaresNeededForNewWord >= BOARD_SIZE) // not enough rows at right of (row, col) + return FALSE; + for ( ; numFreeSquaresNeededForNewWord > 0; --numFreeSquaresNeededForNewWord) + { + ++col; + if (gs->boardTiles[row][col] != TILE_TYPE_NONE) + return FALSE; + } + if (col == BOARD_SIZE - 1) + return TRUE; + // One more free space is needed to keep the new word from touching an existing word. + return gs->boardTiles[row][col + 1] == TILE_TYPE_NONE; +} + + +// Returns TRUE if the required free space exists. +// +static BOOL +GameState_checkFreeSpaceUp(const GameState *gs, + byte row, byte col, + byte numFreeSquaresNeededForNewWord) +{ + if (row < numFreeSquaresNeededForNewWord) // not enough rows above (row, col) + return FALSE; + for ( ; numFreeSquaresNeededForNewWord > 0; --numFreeSquaresNeededForNewWord) + { + --row; + if (gs->boardTiles[row][col] != TILE_TYPE_NONE) + return FALSE; + } + if (row == 0) + return TRUE; + // One more free space is needed to keep the new word from touching an existing word. + return gs->boardTiles[row - 1][col] == TILE_TYPE_NONE; +} + + +// Returns TRUE if the required free space exists. +// +static BOOL +GameState_checkFreeSpaceDown(const GameState *gs, + byte row, byte col, + byte numFreeSquaresNeededForNewWord) +{ + if (row + numFreeSquaresNeededForNewWord >= BOARD_SIZE) // not enough rows below (row, col) + return FALSE; + for ( ; numFreeSquaresNeededForNewWord > 0; --numFreeSquaresNeededForNewWord) + { + ++row; + if (gs->boardTiles[row][col] != TILE_TYPE_NONE) + return FALSE; + } + if (row == BOARD_SIZE - 1) + return TRUE; + // One more free space is needed to keep the new word from touching an existing word. + return gs->boardTiles[row + 1][col] == TILE_TYPE_NONE; +} + + +byte +GameState_detectHorizontalPrefix(const GameState *gs, byte row, byte col) +{ + if (row >= BOARD_SIZE || col >= BOARD_SIZE) + return 0; // out of bounds + byte before; + for (before = 1; before <= col; ++before) + if (gs->boardTiles[row][col - before] == TILE_TYPE_NONE) + break; + return before - 1; +} + + +byte +GameState_detectHorizontalSuffix(const GameState *gs, byte row, byte col) +{ + if (row >= BOARD_SIZE || col >= BOARD_SIZE) + return 0; // out of bounds + byte after; + for (after = 1; col + after < BOARD_SIZE; ++after) + if (gs->boardTiles[row][col + after] == TILE_TYPE_NONE) + break; + return after - 1; +} + + +byte +GameState_detectHorizontalWordLimits(const GameState *gs, + byte row, byte col, + byte *startCol) +{ + byte before = GameState_detectHorizontalPrefix(gs, row, col); + byte after = GameState_detectHorizontalSuffix(gs, row, col); + byte length = after + before + 1; + if (length == 1) + return 0; // no word found + *startCol = col - before; + return length; +} + + +byte +GameState_detectVerticalPrefix(const GameState *gs, byte row, byte col) +{ + if (row >= BOARD_SIZE || col >= BOARD_SIZE) + return 0; // out of bounds + byte before; + for (before = 1; before <= row; ++before) + if (gs->boardTiles[row - before][col] == TILE_TYPE_NONE) + break; + return before - 1; +} + + +byte +GameState_detectVerticalSuffix(const GameState *gs, byte row, byte col) +{ + if (row >= BOARD_SIZE || col >= BOARD_SIZE) + return 0; // out of bounds + byte after; + for (after = 1; row + after < BOARD_SIZE; ++after) + if (gs->boardTiles[row + after][col] == TILE_TYPE_NONE) + break; + return after - 1; +} + + +byte +GameState_detectVerticalWordLimits(const GameState *gs, + byte row, byte col, + byte *startRow) +{ + byte before = GameState_detectVerticalPrefix(gs, row, col); + byte after = GameState_detectVerticalSuffix(gs, row, col); + byte length = after + before + 1; + if (length == 1) + return 0; // no word found + *startRow = row - before; + return length; +} + + +char +GameState_getTileTypeChar(byte tileType) +{ + switch (tileType) + { + case TILE_TYPE_BLANK: return 127; // DEL character rendered as filled rectangle in 4x8 font + case TILE_TYPE_NONE: return ' '; + default: return '@' + (char) tileType; // 'A'..'Z' + } +} + + +// Fills destWord[] with the word found at position (row, col) and +// going in the direction given by 'horizontally'. +// row, col: Position of the first letter of the word. +// letterInEmptySquare: Tile value that is used if a board position has no tile. +// +static void +GameState_readWordFromBoard(const GameState *gs, + char destWord[MAX_WORD_LEN + 1], + BOOL horizontally, + byte row, + byte col, + byte length, + char letterInEmptySquare) +{ + for (byte i = 0; i < length; ++i) + { + byte tileType = gs->boardTiles[row][col]; + if (tileType == TILE_TYPE_BLANK) + tileType = GameState_getBlankTileLetter(gs, row, col); + destWord[i] = (tileType == TILE_TYPE_NONE + ? letterInEmptySquare + : GameState_getTileTypeChar(tileType)); + if (horizontally) + ++col; + else + ++row; + } + destWord[length] = '\0'; +} + + +// horizontally: Orientation in which the candidate word is positioned. +// hangLetterOffset: Offset in candidateWord[] of the letter that uses a tile +// already on the board. (Example, if candidateWord is "FOOBAR" +// and hangLetterOffset is 3, then we are trying to place "FOO" +// and "AR" around a "B" tile already on the board. +// +BOOL +GameState_checkAdjacentWords(const GameState *gs, + BOOL horizontally, + byte row, + byte col, + byte hangLetterOffset, + const char *candidateWord, + byte candidateWordLength) +{ + // (dRow, dCol) is the couple to add to (row, col) to go forward in reading direction. + sbyte dRow = !horizontally; + sbyte dCol = horizontally; + + for (byte i = 0; i < candidateWordLength; ++i, row += dRow, col += dCol) + if (i != hangLetterOffset) + { + // Does candidateWord[i] at (row, col) form a word with the letters adjacent to it? + byte detectedRow, detectedCol, detectedLength; + if (!horizontally) + { + detectedLength = GameState_detectHorizontalWordLimits(gs, row, col, &detectedCol); + detectedRow = row; + } + else + { + detectedLength = GameState_detectVerticalWordLimits(gs, row, col, &detectedRow); + detectedCol = col; + } + if (detectedLength > 0) + { + char detectedWord[MAX_WORD_LEN + 1]; + GameState_readWordFromBoard(gs, detectedWord, !horizontally, + detectedRow, detectedCol, detectedLength, + candidateWord[i]); + BOOL isInDict = isWordInDictionary(detectedWord); + if (!isInDict) + return FALSE; // reject because adjacent word not in dictionary + } + } + + return TRUE; +} + + +BOOL +GameState_tryHangWord(const GameState *gs, + const char *candidateWord, byte candidateWordLength, + char boardLetterToHangTo, + byte freeSquaresNeededBeforeForNewWord, + byte freeSquaresNeededAfterForNewWord, + BOOL *outHorizontally, byte *outRow, byte *outCol) +{ + //printf("TRYHANGWORD: %c %u %u\n", + // boardLetterToHangTo, freeSquaresNeededBeforeForNewWord, freeSquaresNeededAfterForNewWord); + byte tileTypeToHangTo = boardLetterToHangTo - '@'; // 1..26 + for (byte row = 0; row < BOARD_SIZE; ++row) + { + for (byte col = 0; col < BOARD_SIZE; ++col) + { + if (gs->boardTiles[row][col] == tileTypeToHangTo) + { + // N.B.: This version always tries the vertical first and always accepts it if it works. + // This is not an optimal strategy. + if (GameState_checkFreeSpaceUp(gs, row, col, freeSquaresNeededBeforeForNewWord) + && GameState_checkFreeSpaceDown(gs, row, col, freeSquaresNeededAfterForNewWord) + && GameState_checkAdjacentWords(gs, FALSE, + row - freeSquaresNeededBeforeForNewWord, col, + freeSquaresNeededBeforeForNewWord, + candidateWord, candidateWordLength)) + { + //printf("HANG TO %c VERT. AT (%u, %u)\n", boardLetterToHangTo, row, col); + *outHorizontally = FALSE; + *outRow = row - freeSquaresNeededBeforeForNewWord; + *outCol = col; + return TRUE; + } + if (GameState_checkFreeSpaceLeft(gs, row, col, freeSquaresNeededBeforeForNewWord) + && GameState_checkFreeSpaceRight(gs, row, col, freeSquaresNeededAfterForNewWord) + && GameState_checkAdjacentWords(gs, TRUE, + row, col - freeSquaresNeededBeforeForNewWord, + freeSquaresNeededBeforeForNewWord, + candidateWord, candidateWordLength)) + { + //printf("HANG TO %c HORIZ. AT (%u, %u)\n", boardLetterToHangTo, row, col); + *outHorizontally = TRUE; + *outRow = row; + *outCol = col - freeSquaresNeededBeforeForNewWord; + return TRUE; + } + } + } + } + //printf("FAIL TO HANG TO %c\n", boardLetterToHangTo); + return FALSE; +} + + +byte +GameState_getTileWithBoundsChecking(const GameState *self, byte row, byte col) +{ + if (row >= BOARD_SIZE) // if 255 (-1) or below last row + return TILE_TYPE_NONE; + if (col >= BOARD_SIZE) // if 255 (-1) or at right of last column + return TILE_TYPE_NONE; + return GameState_getTile(self, row, col); +} + + +BOOL +GameState_detectCrossingWord(const GameState *gs, + byte initRow, + byte initCol, + byte rowInc, + byte colInc, + byte *foundWordRow, + byte *foundWordCol, + byte *indexOfTileToPlace, + byte *foundWordLen) +{ + // First go backward to find the start of the word, if any. + // Backward means left if the caller is processing a vertical word, + // or up if it's a horizontal word. + // + *foundWordRow = initRow; + *foundWordCol = initCol; + *foundWordLen = 0; + for (;;) + { + *foundWordRow -= rowInc; + *foundWordCol -= colInc; + + if (*foundWordRow >= BOARD_SIZE || *foundWordCol >= BOARD_SIZE) + break; // now to the left of the board, or above it, so stop + + if (GameState_getTile(gs, *foundWordRow, *foundWordCol) == TILE_TYPE_NONE) + break; // reached an empty tile, so stop + + ++*foundWordLen; + } + + *indexOfTileToPlace = *foundWordLen; + + // Get back to the last non-empty tile seen. + // + *foundWordRow += rowInc; + *foundWordCol += colInc; + + // Go forward (i.e., right or down) to find the end of the word, if any. + // + byte wordEndRow = initRow, wordEndCol = initCol; + for (;;) + { + wordEndRow += rowInc; + wordEndCol += colInc; + + if (wordEndRow >= BOARD_SIZE || wordEndCol >= BOARD_SIZE) + break; // now to the left of the board, or above it, so stop + + if (GameState_getTile(gs, wordEndRow, wordEndCol) == TILE_TYPE_NONE) + break; // reached an empty tile, so stop + + ++*foundWordLen; + } + + // (wordEndRow, wordEndCol) is now one PAST the last letter. + + ++*foundWordLen; // count the tile to place + + //printf("\t""detectCrossingWord: (%u, %u) -> (%u, %u), %u.\n", + // *foundWordRow, *foundWordCol, wordEndRow, wordEndCol, *foundWordLen); + + return *foundWordLen > 1; +} diff --git a/GameState.h b/GameState.h new file mode 100644 index 0000000..2d970b7 --- /dev/null +++ b/GameState.h @@ -0,0 +1,170 @@ +/* GameState.h + Copyright (C) 2026 Pierre Sarrazin + + 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 . +*/ + +#ifndef _H_GameState +#define _H_GameState + +#include "defs.h" + + +typedef struct PlayedBlankTile +{ + byte row, col; // position where blank tile played on board + byte letterTileType; // 1..26 = A..Z +} PlayedBlankTile; + + +typedef struct GameState +{ + // Bag of tiles from which the players pick at random. + // Indexed with TILE_TYPE_BLANK and 1..26. + // + byte numTiles[NUM_TILE_TYPES]; + + byte boardTiles[BOARD_SIZE][BOARD_SIZE]; // TILE_TYPE_BLANK, 1..26 = A..Z, TILE_TYPE_NONE + BOOL isBoardEmpty; + byte numPlayedBlankTiles; + PlayedBlankTile playedBlankTiles[NUM_BLANK_TILES]; // only indices < numPlayedBlankTiles are used +} GameState; + + +// Matrix of SQ_* enum values. +// +extern const byte GameState_boardSquareTypes[BOARD_SIZE][BOARD_SIZE]; + + +void GameState_init(GameState *gs); + + +byte GameState_getNumTilesOfType(const GameState *gs, byte tileType); + + +// Returns the number of points associated with the given tile type, +// without regard to where on the board it gets played. +// +byte GameState_getTileValue(const GameState *gs, byte tileType); + + +// row, col: 0..BOARD_SIZE-1. +// No bounds checking. +// A cast is used to prevent using this function to change the board. +// +#define GameState_getTile(gs, row, col) ((byte) (gs)->boardTiles[row][col]) + + +// Like GameState_getTile() but checks if the coordinates are valid. +// If they are not, returns TILE_TYPE_NONE. +// +byte GameState_getTileWithBoundsChecking(const GameState *self, + byte row, byte col); + + +// Returns the letter tile type (1..26) represented by the blank at +// the specified position, if any. Otherwise, returns TILE_TYPE_NONE. +// +byte GameState_getBlankTileLetter(const GameState *gs, byte row, byte col); + + +// Sets square (row, col) to tileType. +// If tileType is TILE_TYPE_BLANK, remembers that the blanks +// represents letterTileTypeIfBlank, which then must be 1..26. +// Must not be used for from than NUM_BLANK_TILES. +// This is ensured by how the bag is initialized using +// NUM_BLANK_TILES by GameState_init(). +// +void GameState_setTile(GameState *gs, byte row, byte col, + byte tileType, byte letterTileTypeIfBlank); + + +#define GameState_isBoardEmpty(gs) ((gs)->isBoardEmpty) + + +byte GameState_countTilesInBag(const GameState *gs); + + +// Pick a tile at random from the bag. +// Returns TILE_TYPE_BLANK or 1..26 upon success, TILE_TYPE_NONE upon failure. +// +byte GameState_pickRandomLetter(GameState *gs); + + +void GameState_fillRackEmptySlots(GameState *gs, byte rack[RACK_SIZE]); + + +BOOL GameState_tryHangWord(const GameState *gs, + const char *candidateWord, byte candidateWordLength, + char boardLetterToHangTo, + byte freeSquaresNeededBefore, + byte freeSquaresNeededAfter, + BOOL *outHorizontally, byte *outRow, byte *outCol); + + +BOOL GameState_checkAdjacentWords(const GameState *gs, + BOOL horizontally, + byte row, + byte col, + byte hangLetterOffset, + const char *candidateWord, + byte candidateWordLength); + + +// tileType: TILE_TYPE_BLANK, 1..26 or TILE_TYPE_NONE. +// +char GameState_getTileTypeChar(byte tileType); + + +BOOL GameState_detectCrossingWord(const GameState *gs, + byte initRow, + byte initCol, + byte rowInc, + byte colInc, + byte *foundWordRow, + byte *foundWordCol, + byte *indexOfTileToPlace, + byte *foundWordLen); + +byte GameState_detectHorizontalPrefix(const GameState *gs, byte row, byte col); + + +byte GameState_detectHorizontalSuffix(const GameState *gs, byte row, byte col); + + +byte GameState_detectVerticalPrefix(const GameState *gs, byte row, byte col); + + +byte GameState_detectVerticalSuffix(const GameState *gs, byte row, byte col); + + +// Returns the length of the detected word, or zero if none found. +// If the returned length is not zero, *startCol becomes the starting column +// of the detected word. +// +byte GameState_detectHorizontalWordLimits(const GameState *gs, + byte row, byte col, + byte *startCol); + + +// Returns the length of the detected word, or zero if none found. +// If the returned length is not zero, *startRow becomes the starting row +// of the detected word. +// +byte GameState_detectVerticalWordLimits(const GameState *gs, + byte row, byte col, + byte *startRow); + + +#endif /* _H_GameState */ diff --git a/HACKING.md b/HACKING.md new file mode 100644 index 0000000..06a53f5 --- /dev/null +++ b/HACKING.md @@ -0,0 +1,128 @@ +# Memory map after initialization + + Banks Address Size Description + + 0 0000 8 k Dictionary access bank. + 1..3 2000 24 k Code and global variables. + 4..6 8000 24 k Graphics screen (256x192x16). + 7 E000 960 B 32x16 and 40x24 (no attributes) text screens. + 7 E3C0 768 B 4x7 font (right side text). + 7 E6C0 256 B 5x8 font (used on board). + 7 E7C0 5696 B Stack space. + 7 FE00 238 B Not used. + - FEEE 18 B CoCo 3 Interrupt vectors. + - FF00 256 B I/O addresses. + +## MMU blocks + + 48..50 Word dictionary. + 51..53 Graphics screen. + 54..56 Word dictionary. + 57..59 Code and global variables. + 60..62 Word dictionary. + 63 Text screen, fonts, stack space. + + +# Automating the keyboard + +To automate keystrokes, edit the `scriptedKeys[]` array in main.c. +Use `\r` to represent the Enter key. +The `pollKeyboard()` function will return each of the characters +in that array before calling `Keyboard_poll()`. + + +# Word list + +The `word-list.txt` word list is based on `enable.txt` from figshare.com, +with a few edits, and is in the public domain. + +See . + +Variables `MIN_WORD_LEN` and `MAX_WORD_LEN` in the Makefile determine +which words get selected from that word list. + +Variable `MAX_NUM_DICT_BLOCKS` in the Makefile limits the number of +8k blocks that can be used to contain the selected words. +The `dictMMUBlockIndexes[]` array in dict.c must contain that number +of MMU block indexes. + +# Data file format + +The data file is named by variable `DATA_FILENAME` in the Makefile +and is generated by `build-data.pl` and read by `loadDataFile()` +in dict.c. + +The format: + +* Sectors that contain the 4x8 font used in the right side of + the game screen. (See `FONT_4x8_BUFFER`, `FONT_4x8_SECTORS`.) + +* Sectors that contain the 5x8 font used on the board. + (See `FONT_5x8_BUFFER`, `FONT_5x8_SECTORS`.) + +* Sequence of 8k blocks: + * 16-bit big endian unsigned word: Number of words in the 8k block. + * List of words: + * One byte per character of the word. + * Bit 7 of the last byte of the word is 1. + (This prevents support for Latin-1 characters.) + +Putting the font data in the data file instead of the executable +allowed shrinking the size of the latter. This was useful to avoid +reaching the limit at $7F80, which is necessary for the LOADM +command to be able to load the entire file. + +The fonts are defined by C files because those files define +byte arrays that used to be included in the compilation. + + +# Text window at the right of the board + +At the right of the board is a text window of 14 columns by 24 rows. + +`writeStringAt()` is the main function to use to write text. + +Calls to `printf()`, `putchar()`, etc. print to a subwindow of +14 columns by 8 rows at the bottom. This subwindow can be used to +print debugging information. + +See `TEXT_WIN_LEFT`, `TEXT_WIN_TOP`, `TEXT_WIN_WIDTH`, `TEXT_WIN_HEIGHT`, +etc., in defs.h. + + +# Tile types + +`TILE_TYPE_NONE` represents the absence of any tile on a board square. + +`TILE_TYPE_BLANK` represents an unmarked wildcard that can represent +any letter. + +Values 1 to 26 represent letters A to Z. + + +# Tile values in points + +These are defined in the letterSpecs[] array in GameState.c. + + +# Debugging with traces in the Becker port + +During the game, printf() et al. print to a small text window at the +buttom right corner of the game screen. + +This can be used for debugging, as long as the quantity of traces +is small. + +For larger traces, sending the output to a CoCo emulator's Becker port +is more viable. + +To do this, edit `graphics.c` and uncomment this line: + + //#define TRACES_TO_BECKER_PORT + +Then build. Before launching the emulator, a server on the same machine +must be listening to TCP port 65504. This server should then copy all +the traces it receives to standard output or to a file. + +This only applies to the graphical screen, not to the help screen. + diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..ebae5ef --- /dev/null +++ b/Makefile @@ -0,0 +1,205 @@ +PACKAGE = coco-letters +VERSION = 0.1.0 + +DISPLAY_NAME = CoCo Letters + +# Must be at most 8 characters. +PACKAGE_SHORT = letters + +# Length of the words to be selected from file $(WORDLIST). +MIN_WORD_LEN = 2 +MAX_WORD_LEN = 5 + +# Maximum number of MMU blocks that can contain dictionary entries. +# See the memory map in HACKING.md. +MAX_NUM_DICT_BLOCKS = 9 + +# Required libraries. +DECBFILE_LIB = decbfile +DECBFILE_LIB_DIR = decbfile +BCONTROL_LIB = bcontrol +BCONTROL_LIB_DIR = bcontrol +BSOUND_LIB = bsound +BSOUND_LIB_DIR = bsound + +# Main program. +SRC = \ + main.c \ + graphics.c \ + file.c \ + dict.c \ + GameState.c \ + GamePlayer.c \ + WordSearch.c \ + CursorBlinker.c \ + PositionIterator.c + +# N.B.: font4x8-ascii.c and font5x8-A-Z.c are not compiled. +# They are read by $(BUILD_DATA) to generate part of the game data file. + +GENERATED_SRC = $(WORD_LENGTH_FILENAME) + +HEADERS = \ + defs.h \ + graphics.h \ + file.h \ + dict.h \ + GameState.h \ + GamePlayer.h \ + WordSearch.h \ + palette.h \ + board.h \ + CursorBlinker.h \ + PositionIterator.h + +LIBS = -L $(DECBFILE_LIB_DIR) -l$(DECBFILE_LIB) \ + -L $(BCONTROL_LIB_DIR) -l$(BCONTROL_LIB) \ + -L $(BSOUND_LIB_DIR) -l$(BSOUND_LIB) +BIN = $(PACKAGE_SHORT).bin +DSK = $(PACKAGE)-$(VERSION).dsk +PCLEARARG = 1 + +# Dictionary. + +# List of words. +WORDLIST = word-list.txt + +# Files generated by the BUILD_DATA script from $(WORDLIST). +DATA_FILENAME = $(PACKAGE_SHORT).dat +WORD_LENGTH_FILENAME = word-length-index.c + +# Script that builds DATA_FILENAME. +# +BUILD_DATA = build-data.pl + + +# Compilation and linking flags. +# The limit is $7F80 because 128 bytes are left for Basic's stack, +# which still exists at the moment when the user EXECs $(BIN). +# +ORG = --org=2000 --limit=7F80 + +TARGET = coco +INTERMEDIATE = #--intermediate +WERROR = -Werror +STACKSPACE = 2048 +OPTIM = -fomit-frame-pointer -Oy +NDEBUG = -DNDEBUG + +# Unsigned 16 bit integer other than 0. +# If defined, gets passed to srand(). +# If not defined, timer is used. +# +FIXED_SEED = #-DFIXED_SEED=42 + +DEFINES = \ + '-DDISPLAY_NAME="$(DISPLAY_NAME)"' \ + -DVERSION=\"$(VERSION)\" \ + $(NDEBUG) \ + -DDATA_FILENAME=\"$(DATA_FILENAME)\" \ + -DMIN_WORD_LEN=$(MIN_WORD_LEN) \ + -DMAX_WORD_LEN=$(MAX_WORD_LEN) \ + -DMAX_NUM_DICT_BLOCKS=$(MAX_NUM_DICT_BLOCKS) \ + $(FIXED_SEED) +CFLAGS = --$(TARGET) $(WERROR) $(INTERMEDIATE) $(NO_RELOCATE) $(OPTIM) \ + $(DEFINES) \ + -I $(DECBFILE_LIB_DIR) -I $(BCONTROL_LIB_DIR) -I $(BSOUND_LIB_DIR) \ + --stack-space=$(STACKSPACE) +LDFLAGS = --$(TARGET) $(ORG) $(INTERMEDIATE) + +OBJ = $(GENERATED_SRC:.c=.o) $(SRC:.c=.o) + +DISTFILES = \ + README.md HACKING.md COPYING \ + Makefile \ + $(SRC) $(HEADERS) font4x8-ascii.c font5x8-A-Z.c autostart.c \ + $(BUILD_DATA) $(WORDLIST) + +# Tools. +CMOC = cmoc +PERL = perl +TAR = tar +WRITECOCOFILE = writecocofile +INSTALL_LOADER = install-coco-boot-loader +XROAR = xroar +PARSE_COCO_BIN = parse-coco-bin + +all: $(DSK) + +$(BIN): $(OBJ) $(DECBFILE_LIB_DIR)/lib$(DECBFILE_LIB).a \ + $(BCONTROL_LIB_DIR)/lib$(BCONTROL_LIB).a \ + $(BSOUND_LIB_DIR)/lib$(BSOUND_LIB).a + $(CMOC) -o $(BIN) $(LDFLAGS) $(OBJ) $(LIBS) + +.PHONY: dict +dict: $(WORD_LENGTH_FILENAME) + +$(DATA_FILENAME) $(WORD_LENGTH_FILENAME): $(BUILD_DATA) $(WORDLIST) defs.h + $(PERL) $(BUILD_DATA) $(WORDLIST) $(DATA_FILENAME) $(WORD_LENGTH_FILENAME) $(MIN_WORD_LEN) $(MAX_WORD_LEN) $(MAX_NUM_DICT_BLOCKS) + test -f $(DATA_FILENAME) + test -f $(WORD_LENGTH_FILENAME) + +$(DSK): $(BIN) $(DATA_FILENAME) autostart.bin + $(PERL) -e 'print chr(255) x (35*18*256)' > $(DSK) + $(INSTALL_LOADER) $(DSK) autostart.bin + $(WRITECOCOFILE) --allocate-after-dir $(DSK) $(BIN) + $(WRITECOCOFILE) --allocate-before-dir $(DSK) $(DATA_FILENAME) + +# Loader that goes on track 34 to be executed by the CoCo DOS command. +autostart.bin: autostart.c Makefile + $(CMOC) --dos -o $@ -D'COMMAND="CLEAR8:PCLEAR$(PCLEARARG):LOADM\"$(PACKAGE_SHORT)\":EXEC"' autostart.c + +.PHONY: sizes +sizes: $(BIN) + $(PARSE_COCO_BIN) $(BIN) + +%.o: %.c + $(CMOC) -c $(CFLAGS) -o $@ $< + +.PHONY: clean-dict +clean-dict: + rm -f $(DATA_FILENAME) $(WORD_LENGTH_FILENAME) + +clean: clean-dict + rm -f $(BIN) autostart.bin $(OBJ) $(OBJ:.o=.s) $(OBJ:.o=.lst) $(PACKAGE).map $(PACKAGE).link + +distclean: clean + rm -f $(GENERATED_SRC) $(SRC:.c=.d) + +.PHONY: dist distcheck +dist: + $(TAR) -czf $(PACKAGE)-$(VERSION).tar.gz --transform 's,^,$(PACKAGE)-$(VERSION)/,' $(DISTFILES) + +distcheck: dist + mkdir ,distcheck + $(TAR) -C ,distcheck -xzf $(PACKAGE)-$(VERSION).tar.gz + $(MAKE) -C ,distcheck/$(PACKAGE)-$(VERSION) \ + DECBFILE_LIB_DIR=../../$(DECBFILE_LIB_DIR) \ + BCONTROL_LIB_DIR=../../$(BCONTROL_LIB_DIR) \ + BSOUND_LIB_DIR=../../$(BSOUND_LIB_DIR) + rm -fr ,distcheck + @echo "SUCCESS: $(PACKAGE)-$(VERSION).tar.gz ready for distribution" + +.PHONY: binaries +binaries: $(DSK) + $(TAR) -czf $(PACKAGE)-$(VERSION)-binaries.tar.gz $(PACKAGE)-$(VERSION).dsk + +# Runs make with arguments $(RECURSION) in the library projects used by this package. +# Supports the -n (dry run) option. +# Example: make recurse RECURSION=clean +# +.PHONY: recurse +recurse: + $(MAKE) -C $(DECBFILE_LIB_DIR) $(RECURSION) + $(MAKE) -C $(BCONTROL_LIB_DIR) $(RECURSION) + $(MAKE) -C $(BSOUND_LIB_DIR) $(RECURSION) + +# Automatic prerequisite generation. +%.d: %.c + $(CMOC) --deps-only $(CFLAGS) $< + +.PHONY: cleandeps +cleandeps: + rm -f $(SRC:.c=.d) + +include $(SRC:.c=.d) diff --git a/PositionIterator.c b/PositionIterator.c new file mode 100644 index 0000000..6fc067d --- /dev/null +++ b/PositionIterator.c @@ -0,0 +1,47 @@ +/* PositionIterator.c + Copyright (C) 2026 Pierre Sarrazin + + 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 . +*/ + +#include "PositionIterator.h" + + +void +PositionIterator_init(PositionIterator *self, BOOL across, byte *row, byte *col) +{ + self->across = across; + self->row = row; + self->col = col; +} + + +void +PositionIterator_increment(PositionIterator *self) +{ + if (self->across) + ++*self->col; + else + ++*self->row; +} + + +void +PositionIterator_decrement(PositionIterator *self) +{ + if (self->across) + --*self->col; + else + --*self->row; +} diff --git a/PositionIterator.h b/PositionIterator.h new file mode 100644 index 0000000..dbfec04 --- /dev/null +++ b/PositionIterator.h @@ -0,0 +1,48 @@ +/* PositionIterator.h + Copyright (C) 2026 Pierre Sarrazin + + 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 . +*/ + +#ifndef _H_PositionIterator +#define _H_PositionIterator + +#include + + +// Object that decrements a coordinate, but not the other, +// depending on the value of 'across'. +// +typedef struct PositionIterator +{ + BOOL across; + byte *row; + byte *col; +} PositionIterator; + + +void PositionIterator_init(PositionIterator *self, BOOL across, byte *row, byte *col); + + +// Increments *col if across is TRUE; increments *row otherwise. +// +void PositionIterator_increment(PositionIterator *self); + + +// Decrements *col if across is TRUE; decrements *row otherwise. +// +void PositionIterator_decrement(PositionIterator *self); + + +#endif /* _H_PositionIterator */ diff --git a/README.md b/README.md new file mode 100644 index 0000000..34744e7 --- /dev/null +++ b/README.md @@ -0,0 +1,36 @@ +# Word Game + +Copyright © 2026 Pierre Sarrazin + +License: GNU GPL v3 or later, except where stated otherwise. + See file COPYING. + +Home page: + +Insert the floppy disk that contains this game in drive 0, +then type DOS and press the Enter key. + + +# Requirements + +## Hardware + +* CoCo 3. +* RGB monitor. +* Floppy disk controller. + + +## Software + +These libraries are needed to build this game from its source code: + +* decbfile (>= 0.1.13) +* bcontrol (>= 0.1.6) (keyboard and joystick support) +* bsound (>= 0.1.4) (sound) + +They can be obtained from the CMOC Home Page. + + +# Version history + + 0.1.0 20??-FIXME First public release. diff --git a/WordSearch.c b/WordSearch.c new file mode 100644 index 0000000..d2010ac --- /dev/null +++ b/WordSearch.c @@ -0,0 +1,238 @@ +/* WordSearch.c + Copyright (C) 2026 Pierre Sarrazin + + 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 . +*/ + +#include "WordSearch.h" + +#include "GameState.h" +#include "PositionIterator.h" + + +void +WordSearch_init(WordSearch *ws, + byte *rack, + BOOL allInRack, + byte difficultyLevel, + const GameState *gs) +{ + ws->rack = rack; + ws->allInRack = allInRack; + ws->difficultyLevel = difficultyLevel; + ws->numWordsProcessed = 0; + ws->foundWord[0] = '\0'; + ws->foundWordRow = ws->foundWordCol = 0; + ws->foundWordHorizontal = FALSE; + ws->gameState = gs; +} + + +void +WordSearch_initWordWalk(const WordSearch *ws, + byte *row, + byte *col, + byte *rowInc, + byte *colInc, + const char **wordToPlace, + byte *wordLen) +{ + assert(ws->foundWordRow < BOARD_SIZE); + *row = ws->foundWordRow; + *col = ws->foundWordCol; + if (ws->foundWordHorizontal) + { + *rowInc = 0; + *colInc = 1; + } + else + { + *rowInc = 1; + *colInc = 0; + } + *wordToPlace = ws->foundWord; + *wordLen = (byte) strlen(*wordToPlace); +} + + +// wordFactor: In/out. May get multiplied by 2 or 3. +// +static void +processSquareType(byte row, byte col, + byte *squareType, byte *wordFactor, byte *letterFactor) +{ + *squareType = GameState_boardSquareTypes[row][col]; + *letterFactor = 1; + switch (*squareType) + { + case SQ_EMPTY: break; + case SQ_START: *wordFactor *= 2; break; + case SQ_TRIPLE_WORD: *wordFactor *= 3; break; + case SQ_DOUBLE_WORD: *wordFactor *= 2; break; + case SQ_TRIPLE_LETTER: *letterFactor = 3; break; + case SQ_DOUBLE_LETTER: *letterFactor = 2; break; + default: assert(FALSE); + } +} + + +// wordFactor: In/out. +// tileToPlace: 1..26, or TILE_TYPE_BLANK. +// Returns a number of points scored. +// +static word +countPointsOfTileToPlace(const GameState *gs, + byte tileToPlace, + byte row, + byte col, + byte *wordFactor) +{ + byte tileOnBoard = GameState_getTile(gs, row, col); + //printf("\t\t""countPointsOfTileToPlace: row=%u, col=%u: tileOnBoard=%u\n", row, col, tileOnBoard); + + if (tileOnBoard != TILE_TYPE_NONE) + return 0; // square already occupied, so no points + + byte squareType; + byte letterFactor; + processSquareType(row, col, &squareType, wordFactor, &letterFactor); + + //printf("\t\t""countPointsOfTileToPlace: squareType=%u, wordFactor=%u, letterFactor=%u\n", + // squareType, *wordFactor, letterFactor); + + // Count the tile's points. + byte tilePoints = GameState_getTileValue(gs, tileToPlace); + + //printf("\t\t""countPointsOfTileToPlace: tileToPlace=%u, tilePoints=%u.\n", + // tileToPlace, tilePoints); + + return (word) tilePoints * letterFactor; +} + + +typedef struct CrossingWord +{ + BOOL across; + byte row; + byte col; + byte indexOfTileToPlace; + byte tileToPlace; + byte length; + byte blankIndex; // index in the crossing word +} CrossingWord; + + +static word +countPointsOfCrossingWords(const GameState *gs, + const CrossingWord crossingWords[], + byte numCrossingWords) +{ + word wordValue = 0; + byte wordFactor = 1; + + for (byte w = 0; w < numCrossingWords; ++w) + { + const CrossingWord *cw = &crossingWords[w]; + + byte row = cw->row, col = cw->col; + //printf("\t""countPointsOfCrossingWords: w=%u, (%u, %u)\n", w, row, col); + PositionIterator posIter; + PositionIterator_init(&posIter, cw->across, &row, &col); + + for (byte i = 0; i < cw->length; ++i) + { + byte tileToPlace; + if (i == cw->blankIndex) + tileToPlace = TILE_TYPE_BLANK; + else if (i == cw->indexOfTileToPlace) + tileToPlace = cw->tileToPlace; + else + tileToPlace = TILE_TYPE_NONE; // tile already on board is worth 0 + + //printf("\t\t""i=%u, tileToPlace=%u\n", i, tileToPlace); + + // This may multiply *wordFactor by 2 or 3. + // + word tilePoints = countPointsOfTileToPlace( + gs, tileToPlace, row, col, &wordFactor); + + //printf("\t\t"" tilePoints=%u\n", tilePoints); + wordValue += tilePoints; + PositionIterator_increment(&posIter); + } + } + + //printf("\t""countPointsOfCrossingWords: wordValue=%u, wordFactor=%u\n", wordValue, wordFactor); + return wordValue * wordFactor; +} + + +word +WordSearch_countPointsFromWordsPlayed(const WordSearch *ws, const GameState *gs) +{ + byte row, col, rowInc, colInc, wordLen; + const char *wordToPlace; + WordSearch_initWordWalk(ws, &row, &col, &rowInc, &colInc, &wordToPlace, &wordLen); + + //printf("countPoints: row=%u, col=%u, rowInc=%u, colInc=%u, wordLen=%u, wordToPlace='%s', wordLen=%u.\n", + // row, col, rowInc, colInc, wordLen, wordToPlace, wordLen); + + word wordValue = 0; + byte wordFactor = 1; + CrossingWord foundCrossingWords[MAX_WORD_LEN]; + byte numFoundCrossingWords = 0; + + for (byte i = 0; i < wordLen; ++i, row += rowInc, col += colInc) + { + byte letterTileTypeBehindBlank = ws->letterTileTypeBehindBlank[i]; + byte tileToPlace = (letterTileTypeBehindBlank == TILE_TYPE_NONE ? wordToPlace[i] - '@' : TILE_TYPE_BLANK); + wordValue += countPointsOfTileToPlace(gs, tileToPlace, row, col, &wordFactor); + + // Detect if a word crosses the current letter at (row, col). + // Pass colInc and rowInc in reverse order, so that this call + // advances perpendicularly. + // + CrossingWord *cw = &foundCrossingWords[numFoundCrossingWords]; + if (numFoundCrossingWords < MAX_WORD_LEN + && GameState_detectCrossingWord(gs, row, col, colInc, rowInc, + &cw->row, &cw->col, + &cw->indexOfTileToPlace, + &cw->length)) + { + cw->tileToPlace = tileToPlace; + + cw->across = !ws->foundWordHorizontal; + + // If letter at i is a blank, remember the position + // of the blank in the crossing word. + // + cw->blankIndex = (letterTileTypeBehindBlank == TILE_TYPE_NONE ? 0xFF : i); + //printf(" cw->blankIndex=%u\n", cw->blankIndex); + + ++numFoundCrossingWords; + } + } + + wordValue *= wordFactor; + + //printf(" %u*%u=%u\n", wordValue, wordFactor, wordValue * wordFactor); + //printf(" numFoundCrossingWords=%u\n", numFoundCrossingWords); + + word crossingWordsValue = countPointsOfCrossingWords( + gs, foundCrossingWords, numFoundCrossingWords); + + //printf(" crossingWordsValue=%u\n", crossingWordsValue); + + return wordValue + crossingWordsValue; +} diff --git a/WordSearch.h b/WordSearch.h new file mode 100644 index 0000000..3109475 --- /dev/null +++ b/WordSearch.h @@ -0,0 +1,66 @@ +/* WordSearch.h + Copyright (C) 2026 Pierre Sarrazin + + 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 . +*/ + +#ifndef _H_WordSearch +#define _H_WordSearch + +#include + + +typedef struct WordSearch +{ + byte *rack; + BOOL allInRack; + byte difficultyLevel; // LEVEL_* value; only used for computer's search + size_t numWordsProcessed; + char foundWord[MAX_WORD_LEN + 1]; // NUL-terminated string of letters (no blanks) + + // If a blank tile was used for foundWord[i], then letterTileTypeBehindBlank[i] is 1..26, + // to indicate which letter the blank represents. Otherwise, it is TILE_TYPE_NONE. + byte letterTileTypeBehindBlank[MAX_WORD_LEN]; + + byte foundWordRow; + byte foundWordCol; + BOOL foundWordHorizontal; + const struct GameState *gameState; +} WordSearch; + + +void WordSearch_init(WordSearch *ws, + byte *rack, + BOOL allInRack, + byte difficultyLevel, + const struct GameState *gs); + + +void WordSearch_initWordWalk(const WordSearch *ws, + byte *row, + byte *col, + byte *rowInc, + byte *colInc, + const char **wordToPlace, + byte *wordLen); + + +// Must be called before placing the word on the board. +// +word WordSearch_countPointsFromWordsPlayed(const WordSearch *ws, + const struct GameState *gs); + + + +#endif /* _H_WordSearch */ diff --git a/autostart.c b/autostart.c new file mode 100644 index 0000000..fd71649 --- /dev/null +++ b/autostart.c @@ -0,0 +1,80 @@ +// autostart.c - Program to be run by the Disk Basic DOS command. +// By Pierre Sarrazin +// 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 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 + +#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 + "RUN\"*.BAS\"" + #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 +} diff --git a/board.h b/board.h new file mode 100644 index 0000000..8c11818 --- /dev/null +++ b/board.h @@ -0,0 +1,32 @@ +/* board.h + Copyright (C) 2026 Pierre Sarrazin + + 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 . +*/ + +T _ _ d _ _ _ T _ _ _ d _ _ T EOL +_ D _ _ _ t _ _ _ t _ _ _ D _ EOL +_ _ D _ _ _ d _ d _ _ _ D _ _ EOL +d _ _ D _ _ _ d _ _ _ D _ _ d EOL +_ _ _ _ D _ _ _ _ _ D _ _ _ _ EOL +_ t _ _ _ t _ _ _ t _ _ _ t _ EOL +_ _ d _ _ _ d _ d _ _ _ d _ _ EOL +T _ _ d _ _ _ S _ _ _ d _ _ T EOL +_ _ d _ _ _ d _ d _ _ _ d _ _ EOL +_ t _ _ _ t _ _ _ t _ _ _ t _ EOL +_ _ _ _ D _ _ _ _ _ D _ _ _ _ EOL +d _ _ D _ _ _ d _ _ _ D _ _ d EOL +_ _ D _ _ _ d _ d _ _ _ D _ _ EOL +_ D _ _ _ t _ _ _ t _ _ _ D _ EOL +T _ _ d _ _ _ T _ _ _ d _ _ T diff --git a/build-data.pl b/build-data.pl new file mode 100644 index 0000000..4dbf573 --- /dev/null +++ b/build-data.pl @@ -0,0 +1,388 @@ +#!/usr/bin/perl -w +# +# build-data.pl +# Copyright (C) 2026 Pierre Sarrazin +# +# 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 . +# +########################################################################## +# +# The game's data file contains font data followed by a list of 8k blocks, +# each one of which has this format: +# - Unsigned big-endian word giving the number of dictionary words in +# the file. +# - List of dictionary words, where each word is a string that ends +# in a character whose code is >= 0x80. The actual code of the last +# character of the word is this code & 0x7F. Example: "ABC" is +# encoded as "AB\xC3", because 0xC3 & 0x7F = 67 = ord('C'). +# - Padding to have each block contain 8192 bytes. + +require 5.14.0; # for /r modifier on s/// +use strict; + + +$| = 1; # no buffering on STDOUT + +my ($wordListFilename, $dataFilename, $wordLengthIndexFilename, + $minWordLen, $maxWordLen, $maxBlocks); + +my $sectorSize = 256; # CoCo floppy sector size +my $mmuBlockLen = 8192; # CoCo 3 MMU block size +my $maxBlockLen = $mmuBlockLen - 2; # 1st word of block gives number of words in block +my $numWrittenBlocks = 0; +my $fhBlock; # data file whose name is in $dataFilename +my $dictStartOffset; # offset in bytes where the dictionary starts in $fhBlock + + +# Pads $fhBlock to a multiple of the argument. +# Uses $dictStartOffset. +# +sub +padDCTFile +{ + my ($size) = @_; + die unless $size > 0; + + my $fileLen = tell($fhBlock) - $dictStartOffset; + if ($fileLen < 0) + { + print "ERROR: failed to get writing position in file $dataFilename: $!\n"; + exit 1; + } + my $fileLenAfterPadding = int(($fileLen + $size - 1) / $size) * $size; + my $paddingNeeded = $fileLenAfterPadding - $fileLen; + if ($paddingNeeded > 0) + { + print "Padding with $paddingNeeded bytes.\n"; + print $fhBlock " " x $paddingNeeded; + } +} + + +# Receives a reference to an array of words. +# Writes those words to $fhBlock. +# Increments $numWrittenBlocks upon success. +# +sub writeBlock +{ + my ($raBlock) = @_; + #print "writeBlock: ", $raBlock->[0], "\n"; + + my $numWordsInBlock = scalar(@$raBlock); + die unless $numWordsInBlock <= 65535; + + print "Writing $numWordsInBlock words to $dataFilename\n"; + + print $fhBlock pack("n", $numWordsInBlock); # 16-bit big endian + + my $wordIndexInBlock = 0; + for my $word (@$raBlock) + { + #print "Word at index $wordIndexInBlock: '$word'\n"; + ++$wordIndexInBlock; + my $prefix = substr($word, 0, length($word) - 1); + my $lastChar = substr($word, length($word) - 1); + my $encodedWord = $prefix . chr(ord($lastChar) + 0x80); + print $fhBlock $encodedWord; + } + + ++$numWrittenBlocks; +} + + +# Sort comparator. +# +sub byDecreasingLength +{ + return length($b) <=> length($a); +} + + +# Parses the hex bytes in a C file and writes the binary data to $fh. +# +sub writeFont($$) +{ + my ($fh, $cFilePath) = @_; + + my $numBytesWritten = 0; + my $cFile; + if (!open($cFile, $cFilePath)) + { + print "$0: ERROR: failed to open $cFilePath: $!\n"; + exit 1; + } + while (<$cFile>) + { + # Line example: + # 0xd8, 0x88, 0x78, 0x98, 0xe8, 0x18, 0xd8, 0xf8, // 36 (0x24) + # + s!\s*//.*$!!; # remove any trailing comment + if (/^\s*(0x.*),/) + { + my @bytes = split /,\s*/, $1; # 0xNN, ..., 0xNN + @bytes = map { hex(s/^0x//r) } @bytes; # /r returns modified string instead of success count + my $binary = pack("C*", @bytes); + $numBytesWritten += length($binary); + print $fh $binary; # array of numbers converted to raw binary + } + } + close $cFile; + print "Wrote $numBytesWritten font bytes obtained from $cFilePath\n"; +} + + +sub writeFonts($) +{ + my ($fh) = @_; + + writeFont($fh, "font4x8-ascii.c"); + writeFont($fh, "font5x8-A-Z.c"); + padDCTFile($sectorSize); # pad last sector to 256 bytes +} + + +############################################################################### + + +die unless @ARGV == 6; + +($wordListFilename, $dataFilename, $wordLengthIndexFilename, + $minWordLen, $maxWordLen, $maxBlocks) = @ARGV; + + +die unless defined $maxBlocks; + +# Read the allowed words from $wordListFilename. +# +my $fhWords; +if (!open($fhWords, $wordListFilename)) +{ + print "$0: ERROR: $wordListFilename: $!\n"; + exit 1; +} + +my %wordTable; # key: upper-case word; value: 1 +my $maxWordLenSeen = 0; +my $numRejectedWords = 0; + +while (<$fhWords>) +{ + s/\s+$//; # remove trailing white space + tr/a-z/A-Z/; # convert to uppercase + my $len = length($_); + if ($len >= $minWordLen && $len <= $maxWordLen && /^[A-Z]+$/) + { + $maxWordLenSeen = $len if $len > $maxWordLenSeen; + $wordTable{$_} = 1; + } + else + { + #print "Warning: word '$_' rejected.\n"; + ++$numRejectedWords; + } +} + +close $fhWords; + +my @selectedWords = sort keys %wordTable; +print "Number of words of lengths $minWordLen..$maxWordLen selected from $wordListFilename: ", + scalar(@selectedWords), "\n"; + +die unless @selectedWords > 0; + +# Dump the selected words in a text file. +# +#open(SELECTED_WORDS, ">build-data-selected-words.txt") or die; +#print SELECTED_WORDS join("\n", @selectedWords), "\n"; +#close(SELECTED_WORDS) or die; + +print "Length of the longest selected word: $maxWordLenSeen\n"; +print "Number of rejected words: $numRejectedWords\n"; + +die unless $maxWordLenSeen > 0; + +# Sort the words from longest to shortest. +# +@selectedWords = sort byDecreasingLength @selectedWords; + + +# Create the output file. +# +if (!open($fhBlock, "> $dataFilename")) +{ + print "$0: ERROR: failed to create $dataFilename: $!\n"; + return undef; +} +binmode $fhBlock; + + +# Write font data (not related to the dictionary) at the start +# of the file. +# +writeFonts($fhBlock); + + +# Note where the font data ends and the dictionary data is about +# to be written. +# +$dictStartOffset = tell($fhBlock); + +die unless $dictStartOffset % 256 == 0; + + +my @curBlock; # array of words +my $curBlockLen = 0; # length in bytes of current block, whose length must be <= $maxBlockLen; + # this is also the total length of the strings in @curBlock +my $curBlockWordCount = 0; # number of elements in @curBlock + +my $totalLen = 0; +my $lenPrevWord; # length of the word processed by preceding iteration + + +# key: word length; value: {block, wordOffset, offset}. +# Describes the contents of a single block, not the whole dictionary. +# Each entry gets written to file $wordLengthIndexFilename. +# +my %wordLengthIndex; + +for my $word (@selectedWords) # for each word in decreasing order of length +{ + #print "Word: [$word], lenPrevWord=", $lenPrevWord || -1, "\n"; + $totalLen += length($word); + + if ($curBlockLen + length($word) > $maxBlockLen) # if no room in current block + { + # Any preceding block must be at an offset that is + # a multiple of 8192 bytes. + padDCTFile($mmuBlockLen); + + writeBlock(\@curBlock); + + # Reinit block. + @curBlock = (); + $curBlockLen = 0; + $curBlockWordCount = 0; + } + + # If currentword has different length than previous one, + # declare some array entries. + # + if (!defined $lenPrevWord || length($word) != $lenPrevWord) + { + my $firstLenToDo = (defined $lenPrevWord ? $lenPrevWord - 1 : length($word)); + my $lastLenToDo = length($word); + # Declare entries concerning word lengths $firstLenToDo to $lastLenToDo inclusively. + for (my $wlen = $firstLenToDo; $wlen >= $lastLenToDo; --$wlen) + { + print "Words of length $wlen start in block #", + $numWrittenBlocks, ", at word offset $curBlockWordCount, byte offset $curBlockLen\n"; + $wordLengthIndex{$wlen} = { + block => $numWrittenBlocks, + wordOffset => $curBlockWordCount, + offset => $curBlockLen # byte offset + }; + } + } + + #print "Before: '", $curBlock[0], "', ", scalar(@curBlock), "\n"; + push @curBlock, $word; + #print "First: '", $curBlock[0], "', ", scalar(@curBlock), "\n"; + $curBlockLen += length($word); + ++$curBlockWordCount; + + $lenPrevWord = length($word); +} + +# Complete %wordLengthIndex. +# +{ + die unless defined $lenPrevWord; + die unless defined $minWordLen; + my $firstLenToDo = $lenPrevWord - 1; + my $lastLenToDo = $minWordLen - 1; + for (my $wlen = $firstLenToDo; $wlen >= $lastLenToDo; --$wlen) + { + print "Words of length ", $wlen + 1, " end at block #", + $numWrittenBlocks, + ", at word offset $curBlockWordCount, byte offset $curBlockLen\n"; + $wordLengthIndex{$wlen} = { + block => $numWrittenBlocks, # zero-based block index + wordOffset => $curBlockWordCount, + offset => $curBlockLen + }; + } +} + +# Write the last block, if any. +# +if ($curBlockLen > 0) +{ + padDCTFile($mmuBlockLen); + + writeBlock(\@curBlock); +} + +# The last block only needs to be padded to a multiple of 256 bytes. +# This ends the last sector with defined bytes instead of garbage. +# +padDCTFile($sectorSize); + +# Close the output file. +# +if (!close($fhBlock)) +{ + print "$0: ERROR: failed to close $dataFilename: $!\n"; + exit 1; +} + + +print "Total length of the selected words: $totalLen characters\n"; +print "Number of MMU blocks: $numWrittenBlocks\n"; +print "Word count in last block: $curBlockWordCount\n"; +print "Length of last block: $curBlockLen\n"; + +# Create a C file containing an array. +# +print "Creating $wordLengthIndexFilename\n"; +open(W, "> $wordLengthIndexFilename") or die; +print W <<__EOF__; +/* Generated by build-data.pl. Do not edit. */ +#include "defs.h" +const WordLengthRecord wordLengthRecords[] = +{ +__EOF__ + +# An entry is written for length 1 because it indicates +# where the list of words of length 2 ends. +# +for my $len (1..$maxWordLenSeen) +{ + my $rh = $wordLengthIndex{$len}; + die "len=$len" unless defined $rh->{block}; + die unless $rh->{offset} <= $maxBlockLen; + printf W " { %2u, %4u, %4u }, /* length %u */\n", + $rh->{block}, $rh->{wordOffset}, $rh->{offset}, $len; +} + +print W <<__EOF__; +}; +__EOF__ +printf W "const byte numWordLengthRecords = %u;\n", $maxWordLenSeen; +close(W) or die; + +if ($numWrittenBlocks > $maxBlocks) +{ + print "$0: ERROR: Exceeded maximum number of blocks (wrote $numWrittenBlocks, max is $maxBlocks).\n"; + exit 1; +} diff --git a/defs.h b/defs.h new file mode 100644 index 0000000..309050e --- /dev/null +++ b/defs.h @@ -0,0 +1,176 @@ +/* defs.h + Copyright (C) 2026 Pierre Sarrazin + + 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 . +*/ + +#ifndef _H_defs +#define _H_defs + +#include + +#if 0 +#include +#else + +#ifndef NDEBUG +void assertHandler(const char *file, int lineno, const char *condition); +#define assert(cond) do { if (!(cond)) assertHandler(__FILE__, __LINE__, ""); } while (0) +#define static_assert(cond) typedef char CONCAT(_StaticAssertDummyArray_, __LINE__)[(cond) ? 1 : -1] +#else +#define assert(cond) ((void) 0) +#define static_assert(cond) ((void) 0) +#endif + +#define CONCAT2(a, b) a ## b +#define CONCAT(a, b) CONCAT2(a, b) +#endif + + +// STRINGIFY(FOO) gives "FOO". +// +#define STRINGIFY(x) #x + +// If we have #define FOO 42 +// then STRINGIFY_VALUE(FOO) gives "42". +// +#define STRINGIFY_VALUE(x) STRINGIFY(x) + + +#ifndef MAX_NUM_DICT_BLOCKS +#error "MAX_NUM_DICT_BLOCKS not defined." +#endif +#ifndef MIN_WORD_LEN +#error "MIN_WORD_LEN not defined." +#endif +#ifndef MAX_WORD_LEN +#error "MAX_WORD_LEN not defined." +#endif + +// See HACKING.md for a memory map. + +enum +{ + NUM_DISK_DRIVES = 1, + IRQ_VECTOR = 0xFFF8, + TEXT_SCREEN = 0xE000, // 32x16 and 40x24 hardware text screen buffer + FONT_4x8_BUFFER = TEXT_SCREEN + 40 * 24, // contains bytes defined in font4x8-ascii.c + FONT_4x8_SECTORS = 3, // number of sectors to read to fill that buffer + FONT_5x8_BUFFER = FONT_4x8_BUFFER + FONT_4x8_SECTORS * 256, // contains bytes defined in font5x8-ascii.c + FONT_5x8_SECTORS = 1, // number of sectors to read to fill that buffer + STACK_BOTTOM = 0xFEEE, + BLOCK_SIZE = 8192, // size in bytes of a GIME MMU block + BREAK_KEY = 3, + + // Graphics: + NUM_GRAPHICS_BLOCKS = 3, // 256x192x16 takes three 8k blocks + SCRN_WIDTH = 256u, // in pixels + SCRN_HEIGHT = 192u, // in pixels + NUM_COLORS = 16, // number of CoCo 3 palette slots + BYTES_PER_ROW = SCRN_WIDTH / 2, + CHAR_WIDTH = 5, // number of pixels per graphics text window character column + CHAR_HEIGHT = 8, // number of pixels per graphics text window character row + TEXT_SCREEN_WIDTH = 51, // in characters + TEXT_SCREEN_HEIGHT = 24, + TEXT_WIN_LEFT = 37, // leftmost 51x24 screen column of text window (at right of board) + TEXT_WIN_TOP = 18, + TEXT_WIN_WIDTH = TEXT_SCREEN_WIDTH - TEXT_WIN_LEFT, // in characters + TEXT_WIN_HEIGHT = TEXT_SCREEN_HEIGHT - TEXT_WIN_TOP, + TEXT_TURN_ROW = 3, // text row where "Your/My turn" is written + TEXT_RESULT_ROW = 5, + TEXT_INSTR_ROW = 10, // instructions + TEXT_SCORE_ROW = 16, + + // Hardware text mode (no color attributes): + HW_TEXT_SCREEN_WIDTH = 40, + HW_TEXT_SCREEN_HEIGHT = 24, + HW_TEXT_SCREEN_BUFFER = 0xE000, + HW_TEXT_SCREEN_BACK_COLOR = 0, + HW_TEXT_SCREEN_FORE_COLOR = 63, + + // Game: + BOARD_SIZE = 15, // number of board rows and columns + TILE_WIDTH = 12, // in pixels + TILE_HEIGHT = 12, // in pixels + NUM_TILE_TYPES = 27, // A..Z plus blank + RACK_SIZE = 7, // maximum number of tiles in a player's rack + TILE_TYPE_NONE = 255, + TILE_TYPE_BLANK = 0, + NUM_BLANK_TILES = 2, + NUM_PLAYERS = 2, + LEVEL_EASY = 0, + LEVEL_HARD = 1, + + // CoCo 3 memory blocks. (A 128k machine has blocks 48..63.) + FIRST_GRAPHICS_BLOCK = 51, // graphics in 51..53 + GRAPHICS_START = FIRST_GRAPHICS_BANK * BLOCK_SIZE, + GRAPHICS_END = GRAPHICS_START + SCRN_WIDTH * SCRN_HEIGHT / 2, + // SCRN_* need to be unsigned for this computation to work. + + // CoCo 3 memory banks (0..7). + DICT_BANK = 0, + FIRST_GRAPHICS_BANK = 4, + + // Palette values. + PAL_POS_CURSOR = PAL_BOARD_WRITING, + PAL_BLANK_TILE_FORE = PAL_BOARD_BG, +}; + + +// Board square types. +// +enum +{ + SQ_EMPTY, + SQ_START, + SQ_TRIPLE_WORD, + SQ_DOUBLE_WORD, + SQ_TRIPLE_LETTER, + SQ_DOUBLE_LETTER +}; + + +typedef interrupt void (*ISR)(void); + + +// Gives a number of elements, not a number of bytes. +// +#define ARRAY_SIZE(array) (sizeof(array) / sizeof((array)[0])) + +#define ARRAY_END(array) ((array) + ARRAY_SIZE(array)) + + +#define poke(address, byteValue) (* (byte *) (address) = (byteValue)) + +#define pokeWord(address, wordValue) (* (word *) (address) = (wordValue)) + +#define mmuSet(bank, block) (poke(0xFFA0 + (bank), (block))) + + +typedef struct WordLengthRecord +{ + byte blockNo; // MMU block that contains dictionary data; + // (0 .. MAX_NUM_DICT_BLOCKS - 2) + word wordOffset; // in dictionary words, from start of MMU block + word offset; // in bytes, from start of MMU block +} WordLengthRecord; + + +// Array that is defined in word-length-index.c, generated by build-data.pl. +// +extern const WordLengthRecord wordLengthRecords[]; +extern const byte numWordLengthRecords; // number of elements in wordLengthRecords[] + + +#endif /* _H_defs */ diff --git a/dict.c b/dict.c new file mode 100644 index 0000000..cf76309 --- /dev/null +++ b/dict.c @@ -0,0 +1,413 @@ +/* dict.c + Copyright (C) 2026 Pierre Sarrazin + + 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 . +*/ + +#include "dict.h" + +#include "file.h" + + +// See dict_setSearchProgressCallback(). +// +static void (*dict_searchProgressCallback)(void); + + +void +dict_setSearchProgressCallback(void (*functor)(void)) +{ + dict_searchProgressCallback = functor; +} + + +static byte numDictBlocks; // index into dictMMUBlockIndexes[] + +// See memory map in HACKING.md. +// +static const byte dictMMUBlockIndexes[MAX_NUM_DICT_BLOCKS] = +{ + 48, 49, 50, 54, 55, 56, 60, 61, 62 +}; + + +typedef struct DataFileReader +{ + DECBFile *file; + word fileSectorIndex; // zero-based sector number in 'file' + const word numFileSectors; // length of 'file' in sectors + byte **textScrnWritePos; // used to reposition 32x16 cursor + byte *progressionPos; // position where progression % gets written +} DataFileReader; + + +// Returns a DECB_* error code. +// +static byte +readSector(DataFileReader *fileReader, byte *sectorDest) +{ + byte err = decb_readSector(fileReader->file, sectorDest, fileReader->fileSectorIndex); + if (err != DECB_OK) + { + printf("\nFAILED TO READ SECTOR TO %p: ERROR %u\n", sectorDest, err); + return err; + } + + // Reposition cursor at the screen position of the + // progression percentage, and update it. + // + *fileReader->textScrnWritePos = fileReader->progressionPos; + printf("%3u%%", (fileReader->fileSectorIndex + 1) * 100 + / fileReader->numFileSectors); + return DECB_OK; +} + + +// Reads 'numSectors' from 'fileReader' into 'dest'. +// +static byte +loadFontData(DataFileReader *fileReader, byte *dest, byte numSectors) +{ + for (byte i = 0; i < numSectors; ++i, ++fileReader->fileSectorIndex, dest += 256) + { + byte err = readSector(fileReader, dest); + if (err != DECB_OK) + return err; + } + return DECB_OK; +} + + +// Initializes numDictBlocks. +// +static byte +loadDictionarySectors(DataFileReader *fileReader) +{ + // For each MMU block to fill. + // + for (numDictBlocks = 0; + numDictBlocks < MAX_NUM_DICT_BLOCKS && fileReader->fileSectorIndex < fileReader->numFileSectors; + ++numDictBlocks) + { + // Tune in the next MMU block to fill, at address + // DICT_BANK * BLOCK_SIZE. + // + const byte mmuBlockIndex = dictMMUBlockIndexes[numDictBlocks]; + mmuSet(DICT_BANK, mmuBlockIndex); + + // Start a writing pointer at the start of the MMU block to fill. + // + byte *sectorDest = (byte *) (DICT_BANK * BLOCK_SIZE); + + // For each 256-byte page in the current MMU block, + // but without going past the file's last sector. + // + for (byte i = 0; + i < BLOCK_SIZE / 256 && fileReader->fileSectorIndex < fileReader->numFileSectors; + ++i, ++fileReader->fileSectorIndex, sectorDest += 256) + { + byte err = readSector(fileReader, sectorDest); + if (err != DECB_OK) + return err; + + // Check the first 16 bits of an MMU block, which must contain + // the number of words in that block. A block being 8192 bytes, + // there cannot be more than 8192 words in a block. + // + assert(i != 0 || * (word *) sectorDest <= BLOCK_SIZE); + } + } // for + + return DECB_OK; +} + + +// Initializes numDictBlocks. +// +BOOL +loadDataFile(byte driveNo, byte **textScrnWritePos) +{ + printf("LOADING DICTIONARY... "); + + // Position where the progression percentage will be displayed. + // + byte *progressionPos = *textScrnWritePos; + + const char *filename = DATA_FILENAME; // defined with -D in Makefile + DECBFile file; + byte err = decb_openSectorFile(&file, driveNo, filename); + if (err != DECB_OK) + { + printf("\nFAILED TO OPEN %s: ERROR %u\n", filename, err); + return FALSE; + } + + // Get the number of sectors in the file. + // + byte lastFileGranule; + word numFileSectors = 0; + byte numGranules = decb_getNumGranulesInOpenFile(&file, &lastFileGranule, &numFileSectors); + if (numGranules == 0xFF || numFileSectors == 0) + { + printf("\nFAILED TO GET FILE SIZE\n"); + err = DECB_ERR_CORRUPT_DIR; + } + else + { + DataFileReader fileReader = { &file, 0, numFileSectors, + textScrnWritePos, progressionPos }; + + // Load font data (not related to dictionary). + // + err = loadFontData(&fileReader, (byte *) FONT_4x8_BUFFER, FONT_4x8_SECTORS); + if (err == DECB_OK) + { + assert(fileReader.fileSectorIndex == FONT_4x8_SECTORS); + + err = loadFontData(&fileReader, (byte *) FONT_5x8_BUFFER, FONT_5x8_SECTORS); + if (err == DECB_OK) + { + assert(fileReader.fileSectorIndex == FONT_4x8_SECTORS + FONT_5x8_SECTORS); + + // Load the dictionary into MMU blocks. + // + err = loadDictionarySectors(&fileReader); + } + } + } + + putchar('\n'); + + byte closeErr = decb_closeSectorFile(&file); + if (closeErr != DECB_OK) + { + printf("\nFAILED TO CLOSE %s: ERROR %u\n", filename, err); + return FALSE; + } + return err == DECB_OK; +} + + +// src: Must point to a high-bit terminated string. +// Writes a NUL-terminated string in dest[]. +// +static byte +decodeWord(const byte *src, char dest[MAX_WORD_LEN + 1]) +{ + for (const byte *reader = src; ; ) + { + byte ch = *reader++; + if (ch & 0x80) // if last char + { + *dest++ = (char) (ch & 0x7F); + *dest = '\0'; + return (byte) (reader - src); + } + *dest++ = (char) ch; + } +} + + +BOOL +iterateDictionary(ProcessDictBlockFuncPtr processNextBlock, + ProcessDictWordFuncPtr processDictWord, + byte wordLength, + void *userData) +{ + //printf("itD(wL=%u): nWLR=%u; ", wordLength, numWordLengthRecords); + + byte b; // starting block no (0 .. MAX_NUM_DICT_BLOCKS - 1) + byte lastBlock; // last block (inclusively) to process + word startWordOffset; // in words + word startOffset; // in bytes (0 .. BLOCK_SIZE - 2) + word endWordOffset; // in words + + // If the word length is not zero and within the possible word lengths found in the dictionary, + // then restrict the search to words of that length. + // + if (wordLength >= MIN_WORD_LEN + && wordLength < numWordLengthRecords + (MIN_WORD_LEN - 1)) + { + const WordLengthRecord *startRecord = &wordLengthRecords[wordLength - (MIN_WORD_LEN - 1)]; + b = startRecord->blockNo; + //printf("b=%u; ", b); + assert(b < MAX_NUM_DICT_BLOCKS); + startWordOffset = startRecord->wordOffset; + startOffset = startRecord->offset; + //printf("startOffset=%u; ", startOffset); + assert(startOffset <= BLOCK_SIZE); + + const WordLengthRecord *endRecord = &wordLengthRecords[wordLength - MIN_WORD_LEN]; + lastBlock = endRecord->blockNo; + endWordOffset = endRecord->wordOffset; + } + else // search the entire dictionary: + { + b = 0; + lastBlock = numDictBlocks - 1; + startWordOffset = 0; + startOffset = 0; + endWordOffset = 0xFFFF; + } + //printf("iterateDictionary: lastBlock=%u, startWordOffset=%u, endWordOffset=%u\n", lastBlock, startWordOffset, endWordOffset); + assert(lastBlock < MAX_NUM_DICT_BLOCKS); + + for ( ; b <= lastBlock; ++b) + { + const byte mmuBlockIndex = dictMMUBlockIndexes[b]; + mmuSet(DICT_BANK, mmuBlockIndex); + const byte *block = (unsigned) (DICT_BANK * BLOCK_SIZE); + word numWordsInBlock = * (word *) block; + //printf("iterateDictionary: b=%u, numWordsInBlock=%u\n", b, numWordsInBlock); + if (processNextBlock) + { + byte action = (*processNextBlock)(numWordsInBlock, userData); + if (action == DICT_ITER_STOP) + return FALSE; + if (action == DICT_ITER_NEXT_BLOCK) + continue; + assert(action == DICT_ITER_LIST_WORDS); + mmuSet(DICT_BANK, mmuBlockIndex); // callback invocation may have changed DICT_BANK slot (e.g., recursive search) + } + + if (processDictWord) + { + const byte *wordPtr = block + 2 + startOffset; + word endWordOffsetThisBlock = (endWordOffset == 0xFFFF || b < lastBlock + ? * (word *) block + : endWordOffset); + //printf("iterateDictionary: b=%u, endWordOffsetThisBlock=%u\n", b, endWordOffsetThisBlock); + for (word w = startWordOffset; w < endWordOffsetThisBlock; ++w) + { + char currentWord[MAX_WORD_LEN + 1]; + byte wordLen = decodeWord(wordPtr, currentWord); + //printf("[%s]\n", currentWord); + + // Invoke the callback on the decoded word. + // Stop the iteration if the callback asks for that. + // This callback is allowed to change the block tuned in to DICT_BANK, + // namely if it does a recursive iteration. + // + if (!(*processDictWord)(currentWord, wordLen, userData)) + return FALSE; + + mmuSet(DICT_BANK, mmuBlockIndex); // callback invocation may have changed DICT_BANK slot (e.g., recursive search) + wordPtr += wordLen; + } + } + + // Start next block at its beginning. + startWordOffset = 0; + startOffset = 0; + } + return TRUE; +} + + +static __gcccall asm BOOL +equalStrings(const char *a, const char *b) +{ + asm + { +; N.B.: This code is not appropriate under OS-9, where Y must +; be preserved, as it points to the data segment of the +; current process. +; +; X contains 'a', as per __gcccall. +; + ldy 2,s ; 'b' +@loop + ldb ,x+ ; read char from 'a' + cmpb ,y+ ; compare to char from 'b' + bne @returnFalse +; + tstb + bne @loop +; + ldb #1 + rts +@returnFalse + clrb + } +} + + +typedef struct Lookup +{ + const char *candidateWord; + byte length; + byte blockNo; + BOOL found; // must be initialized to FALSE +} Lookup; + + +static BOOL +compareWords(const char *currentWord, byte currentWordLength, void *userData) +{ + Lookup *lookup = (Lookup *) userData; + //printf("compareWords: currentWord='%s' (%u)\n", currentWord, currentWordLength); + + // Show a progress indicator, if the callback for it has been registered. + // + static byte timeToShowProgress = 0; + if (dict_searchProgressCallback && ++timeToShowProgress == 0) + (*dict_searchProgressCallback)(); + + // If the current word is shorter than the candidate word, then fail, + // because all of the following words are also shorter than the candidate word. + if (currentWordLength < lookup->length) + { + //printf("compareWords: FALSE b/c %u < %u\n", currentWordLength, lookup->length); + return FALSE; // stop iteration and leave lookup->found at FALSE + } + + if (equalStrings(currentWord, lookup->candidateWord)) // if match + { + //printf("compareWords: TRUE (found)\n"); + lookup->found = TRUE; + return FALSE; // stop iteration + } + + return TRUE; // continue iteration +} + + +BOOL +isWordInDictionary(const char *candidateWord) +{ + byte candidateWordLen = (byte) strlen(candidateWord); + if (candidateWordLen < MIN_WORD_LEN || candidateWordLen > MAX_WORD_LEN) + return FALSE; + Lookup lookup = { candidateWord, candidateWordLen, 0, FALSE }; + (void) iterateDictionary(NULL, compareWords, lookup.length, &lookup); + return lookup.found; +} + + +static byte +getStatsFunctor(word numWordsInBlock, void *userData) +{ + //printf("getStatsFunctor(%u, %p)\n", numWordsInBlock, userData, ); + ** (word **) userData += numWordsInBlock; + return DICT_ITER_NEXT_BLOCK; +} + + +void +getDictionaryStats(word *totalNumWords) +{ + *totalNumWords = 0; + if (!iterateDictionary(getStatsFunctor, NULL, 0, (void *) &totalNumWords)) + assert(FALSE); +} diff --git a/dict.h b/dict.h new file mode 100644 index 0000000..890324f --- /dev/null +++ b/dict.h @@ -0,0 +1,88 @@ +/* dict.h + Copyright (C) 2026 Pierre Sarrazin + + 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 . +*/ + +#ifndef _H_dict +#define _H_dict + +#include "defs.h" + + +// See iterateDictionary(). +// +typedef byte (*ProcessDictBlockFuncPtr)(word numWordsInBlock, void *userData); + + +// See iterateDictionary(). +// Must not assume that the 'currentWord' pointer will be valid +// after the call to this function has returned. +// +typedef BOOL (*ProcessDictWordFuncPtr)(const char *currentWord, byte currentWordLength, void *userData); + + +// Loads the data file into memory, including font data and the dictionary. +// driveNo: Drive where that file is. +// textScrnWritePos: Pointer to the cursor pointer. Assigning to that pointer +// must reposition the cursor used by printf(). +// Returns true upon success. +// +BOOL loadDataFile(byte driveNo, byte **textScrnWritePos); + + +// See iterateDictionary(). +// +enum +{ + DICT_ITER_STOP, // stop the iteration + DICT_ITER_NEXT_BLOCK, // jump to the next block (do not call ProcessDictWordFuncPtr) + DICT_ITER_LIST_WORDS // call ProcessDictWordFuncPtr on each word in the current block +}; + + +// Sets the callback that is invoked periodically during a call to +// isWordInDictionary(). Allowed to be null. +// +void dict_setSearchProgressCallback(void (*functor)(void)); + + +// processDictBlock: If not null, invoked for each MMU block that contains dictionary data. +// Must return one of the DICT_ITER_* enum names above. +// processDictWord: Invoked for each word in the current MMU block, after processDictBlock +// has been invoked, and only if the latter returned DICT_ITER_LIST_WORDS. +// If null, then processDictBlock must NOT return DICT_ITER_LIST_WORDS. +// wordLength: If not zero, restrict the search to words of this length. +// userData: Pointer passed to the callbacks. +// Returns TRUE if the iteration reached the end, FALSE otherwise, i.e., +// one of the two callbacks returned a value that requested stopping the iteration. +// +// A callback is allowed to start a sub-iteration by making its own call +// to iterateDictionary(). +// +BOOL iterateDictionary(ProcessDictBlockFuncPtr processDictBlock, + ProcessDictWordFuncPtr processDictWord, + byte wordLength, + void *userData); + + +// See also dict_setSearchProgressCallback(). +// +BOOL isWordInDictionary(const char *candidateWord); + + +void getDictionaryStats(word *totalNumWords); + + +#endif /* _H_dict */ diff --git a/file.c b/file.c new file mode 100644 index 0000000..697a7ac --- /dev/null +++ b/file.c @@ -0,0 +1,35 @@ +/* file.c + Copyright (C) 2026 Pierre Sarrazin + + 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 . +*/ + +#include "file.h" + +#include "defs.h" + + +BOOL +initDiskSystem(DECBDrive drives[]) +{ + decb_init(drives, NUM_DISK_DRIVES); + for (byte driveNo = 0; driveNo < NUM_DISK_DRIVES; ++driveNo) + if (decb_registerDrive(driveNo) != DECB_OK) + { + printf("FAILED TO REGISTER DRIVE %u\n", driveNo); + return FALSE; + } + return TRUE; +} + diff --git a/file.h b/file.h new file mode 100644 index 0000000..19ce40b --- /dev/null +++ b/file.h @@ -0,0 +1,28 @@ +/* file.h + Copyright (C) 2026 Pierre Sarrazin + + 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 . +*/ + +#ifndef _H_file +#define _H_file + +#include "decbfile.h" +#include "dskcon-standalone.h" + + +BOOL initDiskSystem(DECBDrive drives[]); + + +#endif /* _H_file */ diff --git a/font4x8-ascii.c b/font4x8-ascii.c new file mode 100644 index 0000000..9c82a9a --- /dev/null +++ b/font4x8-ascii.c @@ -0,0 +1,108 @@ +/* font4x8.c - ISO-8859-1 font for a 51x24 software text screen, modified from hirestxt. + + By Pierre Sarrazin + This file is in the public domain. +*/ + +#include "font4x8-ascii.h" + + +const unsigned char font4x8_ascii[(127 - ' ' + 1) * 8] = +{ + 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, // 32 (0x20) + 0xd8, 0xd8, 0xd8, 0xd8, 0xd8, 0xf8, 0xd8, 0xf8, // 33 (0x21) + 0xa8, 0xa8, 0xa8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, // 34 (0x22) + 0x98, 0x98, 0x08, 0x98, 0x08, 0x98, 0x98, 0xf8, // 35 (0x23) + 0xd8, 0x88, 0x78, 0x98, 0xe8, 0x18, 0xd8, 0xf8, // 36 (0x24) + 0xf8, 0x28, 0x28, 0xd8, 0xb8, 0x48, 0x48, 0xf8, // 37 (0x25) + 0xb8, 0x58, 0xb8, 0x78, 0x28, 0x58, 0xa8, 0xf8, // 38 (0x26) + 0xd8, 0xd8, 0xb8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, // 39 (0x27) + 0xe8, 0xd8, 0xb8, 0xb8, 0xb8, 0xd8, 0xe8, 0xf8, // 40 (0x28) + 0x78, 0xb8, 0xd8, 0xd8, 0xd8, 0xb8, 0x78, 0xf8, // 41 (0x29) + 0xf8, 0x68, 0x98, 0x98, 0x98, 0x68, 0xf8, 0xf8, // 42 (0x2a) + 0xf8, 0xd8, 0xd8, 0x88, 0xd8, 0xd8, 0xf8, 0xf8, // 43 (0x2b) + 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xd8, 0xd8, 0xb8, // 44 (0x2c) + 0xf8, 0xf8, 0xf8, 0x08, 0xf8, 0xf8, 0xf8, 0xf8, // 45 (0x2d) + 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0x98, 0x98, 0xf8, // 46 (0x2e) + 0xf8, 0xe8, 0xe8, 0xd8, 0xb8, 0x78, 0x78, 0xf8, // 47 (0x2f) + 0x98, 0x68, 0x48, 0x28, 0x68, 0x68, 0x98, 0xf8, // 48 (0x30) + 0xd8, 0x98, 0xd8, 0xd8, 0xd8, 0xd8, 0x88, 0xf8, // 49 (0x31) + 0x98, 0x68, 0xe8, 0x98, 0x78, 0x78, 0x08, 0xf8, // 50 (0x32) + 0x98, 0x68, 0xe8, 0x98, 0xe8, 0x68, 0x98, 0xf8, // 51 (0x33) + 0xe8, 0xc8, 0xa8, 0x68, 0x08, 0xe8, 0xe8, 0xf8, // 52 (0x34) + 0x08, 0x78, 0x78, 0x18, 0xe8, 0xe8, 0x18, 0xf8, // 53 (0x35) + 0x98, 0x68, 0x78, 0x18, 0x68, 0x68, 0x98, 0xf8, // 54 (0x36) + 0x08, 0xe8, 0xe8, 0xd8, 0xb8, 0xb8, 0xb8, 0xf8, // 55 (0x37) + 0x98, 0x68, 0x68, 0x98, 0x68, 0x68, 0x98, 0xf8, // 56 (0x38) + 0x98, 0x68, 0x68, 0x88, 0xe8, 0x68, 0x98, 0xf8, // 57 (0x39) + 0xf8, 0xf8, 0x98, 0x98, 0xf8, 0x98, 0x98, 0xf8, // 58 (0x3a) + 0xf8, 0xf8, 0x98, 0x98, 0xf8, 0xd8, 0xd8, 0xb8, // 59 (0x3b) + 0xe8, 0xd8, 0xb8, 0x78, 0xb8, 0xd8, 0xe8, 0xf8, // 60 (0x3c) + 0xf8, 0xf8, 0xf8, 0x08, 0xf8, 0x08, 0xf8, 0xf8, // 61 (0x3d) + 0x78, 0xb8, 0xd8, 0xe8, 0xd8, 0xb8, 0x78, 0xf8, // 62 (0x3e) + 0x98, 0x68, 0xe8, 0xd8, 0xd8, 0xf8, 0xd8, 0xf8, // 63 (0x3f) + 0x98, 0x68, 0xe8, 0x88, 0x68, 0x68, 0x98, 0xf8, // 64 (0x40) + 0x98, 0x68, 0x68, 0x08, 0x68, 0x68, 0x68, 0xf8, // 65 (0x41) + 0x18, 0x68, 0x68, 0x18, 0x68, 0x68, 0x18, 0xf8, // 66 (0x42) + 0x98, 0x68, 0x78, 0x78, 0x78, 0x68, 0x98, 0xf8, // 67 (0x43) + 0x18, 0x68, 0x68, 0x68, 0x68, 0x68, 0x18, 0xf8, // 68 (0x44) + 0x08, 0x78, 0x78, 0x18, 0x78, 0x78, 0x08, 0xf8, // 69 (0x45) + 0x08, 0x78, 0x78, 0x18, 0x78, 0x78, 0x78, 0xf8, // 70 (0x46) + 0x98, 0x68, 0x78, 0x78, 0x48, 0x68, 0x98, 0xf8, // 71 (0x47) + 0x68, 0x68, 0x68, 0x08, 0x68, 0x68, 0x68, 0xf8, // 72 (0x48) + 0x88, 0xd8, 0xd8, 0xd8, 0xd8, 0xd8, 0x88, 0xf8, // 73 (0x49) + 0xc8, 0xe8, 0xe8, 0xe8, 0xe8, 0x68, 0x98, 0xf8, // 74 (0x4a) + 0x68, 0x58, 0x38, 0x78, 0x38, 0x58, 0x68, 0xf8, // 75 (0x4b) + 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x08, 0xf8, // 76 (0x4c) + 0x68, 0x08, 0x08, 0x68, 0x68, 0x68, 0x68, 0xf8, // 77 (0x4d) + 0x68, 0x28, 0x48, 0x68, 0x68, 0x68, 0x68, 0xf8, // 78 (0x4e) + 0x98, 0x68, 0x68, 0x68, 0x68, 0x68, 0x98, 0xf8, // 79 (0x4f) + 0x18, 0x68, 0x68, 0x18, 0x78, 0x78, 0x78, 0xf8, // 80 (0x50) + 0x98, 0x68, 0x68, 0x68, 0x68, 0x58, 0xa8, 0xf8, // 81 (0x51) + 0x18, 0x68, 0x68, 0x18, 0x68, 0x68, 0x68, 0xf8, // 82 (0x52) + 0x98, 0x68, 0x78, 0x98, 0xe8, 0x68, 0x98, 0xf8, // 83 (0x53) + 0x88, 0xd8, 0xd8, 0xd8, 0xd8, 0xd8, 0xd8, 0xf8, // 84 (0x54) + 0x68, 0x68, 0x68, 0x68, 0x68, 0x68, 0x98, 0xf8, // 85 (0x55) + 0x68, 0x68, 0x68, 0x68, 0x58, 0x58, 0xb8, 0xf8, // 86 (0x56) + 0x68, 0x68, 0x68, 0x68, 0x08, 0x08, 0x68, 0xf8, // 87 (0x57) + 0x68, 0x68, 0x68, 0x98, 0x68, 0x68, 0x68, 0xf8, // 88 (0x58) + 0xa8, 0xa8, 0xa8, 0xd8, 0xd8, 0xd8, 0xd8, 0xf8, // 89 (0x59) + 0x08, 0xe8, 0xd8, 0xb8, 0x78, 0x78, 0x08, 0xf8, // 90 (0x5a) + 0x88, 0xb8, 0xb8, 0xb8, 0xb8, 0xb8, 0x88, 0xf8, // 91 (0x5b) + 0xf8, 0x78, 0x78, 0xb8, 0xd8, 0xe8, 0xe8, 0xf8, // 92 (0x5c) + 0x18, 0xd8, 0xd8, 0xd8, 0xd8, 0xd8, 0x18, 0xf8, // 93 (0x5d) + 0xd8, 0xa8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, // 94 (0x5e) + 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0x08, 0xf8, // 95 (0x5f) + 0xb8, 0xb8, 0xd8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, // 96 (0x60) + 0xf8, 0xf8, 0x98, 0xe8, 0x88, 0x68, 0x08, 0xf8, // 97 (0x61) + 0x78, 0x78, 0x18, 0x68, 0x68, 0x68, 0x18, 0xf8, // 98 (0x62) + 0xf8, 0xf8, 0x88, 0x78, 0x78, 0x78, 0x88, 0xf8, // 99 (0x63) + 0xe8, 0xe8, 0x88, 0x68, 0x68, 0x68, 0x88, 0xf8, // 100 (0x64) + 0xf8, 0xf8, 0x98, 0x68, 0x08, 0x78, 0x98, 0xf8, // 101 (0x65) + 0xc8, 0xb8, 0xb8, 0x08, 0xb8, 0xb8, 0xb8, 0xf8, // 102 (0x66) + 0xf8, 0xf8, 0x88, 0x68, 0x68, 0x08, 0xe8, 0x18, // 103 (0x67) + 0x78, 0x78, 0x18, 0x68, 0x68, 0x68, 0x68, 0xf8, // 104 (0x68) + 0xd8, 0xf8, 0x98, 0xd8, 0xd8, 0xd8, 0x88, 0xf8, // 105 (0x69) + 0xd8, 0xf8, 0x98, 0xd8, 0xd8, 0xd8, 0xd8, 0x38, // 106 (0x6a) + 0x78, 0x78, 0x68, 0x58, 0x38, 0x58, 0x68, 0xf8, // 107 (0x6b) + 0x98, 0xd8, 0xd8, 0xd8, 0xd8, 0xd8, 0x88, 0xf8, // 108 (0x6c) + 0xf8, 0xf8, 0x18, 0x08, 0x08, 0x68, 0x68, 0xf8, // 109 (0x6d) + 0xf8, 0xf8, 0x18, 0x68, 0x68, 0x68, 0x68, 0xf8, // 110 (0x6e) + 0xf8, 0xf8, 0x98, 0x68, 0x68, 0x68, 0x98, 0xf8, // 111 (0x6f) + 0xf8, 0xf8, 0x18, 0x68, 0x68, 0x18, 0x78, 0x78, // 112 (0x70) + 0xf8, 0xf8, 0x88, 0x68, 0x68, 0x88, 0xe8, 0xe8, // 113 (0x71) + 0xf8, 0xf8, 0x18, 0x68, 0x78, 0x78, 0x78, 0xf8, // 114 (0x72) + 0xf8, 0xf8, 0x88, 0x78, 0x98, 0xe8, 0x18, 0xf8, // 115 (0x73) + 0xb8, 0xb8, 0x08, 0xb8, 0xb8, 0xb8, 0xc8, 0xf8, // 116 (0x74) + 0xf8, 0xf8, 0x68, 0x68, 0x68, 0x68, 0x88, 0xf8, // 117 (0x75) + 0xf8, 0xf8, 0x68, 0x68, 0x68, 0x58, 0xb8, 0xf8, // 118 (0x76) + 0xf8, 0xf8, 0x68, 0x68, 0x08, 0x08, 0x18, 0xf8, // 119 (0x77) + 0xf8, 0xf8, 0x68, 0x68, 0x98, 0x68, 0x68, 0xf8, // 120 (0x78) + 0xf8, 0xf8, 0x68, 0x68, 0x68, 0x88, 0xe8, 0x18, // 121 (0x79) + 0xf8, 0xf8, 0x08, 0xd8, 0xb8, 0x78, 0x08, 0xf8, // 122 (0x7a) + 0xe8, 0xd8, 0xd8, 0xb8, 0xd8, 0xd8, 0xe8, 0xf8, // 123 (0x7b) + 0xd8, 0xd8, 0xd8, 0xd8, 0xd8, 0xd8, 0xd8, 0xf8, // 124 (0x7c) + 0x78, 0xb8, 0xb8, 0xd8, 0xb8, 0xb8, 0x78, 0xf8, // 125 (0x7d) + 0xa8, 0x58, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, // 126 (0x7e) + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 127 (0x7f) [Filled rectangle] +}; diff --git a/font5x8-A-Z.c b/font5x8-A-Z.c new file mode 100644 index 0000000..9405bf5 --- /dev/null +++ b/font5x8-A-Z.c @@ -0,0 +1,38 @@ +/* font5x8_A_Z.c - Upper-case letter 5x7 font. + + By Pierre Sarrazin + This file is in the public domain. +*/ + +#include "font5x8-A-Z.h" + + +const unsigned char font5x8_A_Z[26 * 8] = +{ + 0xdc, 0xac, 0x74, 0x74, 0x04, 0x74, 0x74, 0xfc, // 65 (0x41) + 0x0c, 0x74, 0x74, 0x0c, 0x74, 0x74, 0x0c, 0xfc, // 66 (0x42) + 0x8c, 0x74, 0x7c, 0x7c, 0x7c, 0x74, 0x8c, 0xfc, // 67 (0x43) + 0x0c, 0x74, 0x74, 0x74, 0x74, 0x74, 0x0c, 0xfc, // 68 (0x44) + 0x04, 0x7c, 0x7c, 0x0c, 0x7c, 0x7c, 0x04, 0xfc, // 69 (0x45) + 0x04, 0x7c, 0x7c, 0x0c, 0x7c, 0x7c, 0x7c, 0xfc, // 70 (0x46) + 0x8c, 0x74, 0x7c, 0x64, 0x74, 0x74, 0x8c, 0xfc, // 71 (0x47) + 0x74, 0x74, 0x74, 0x04, 0x74, 0x74, 0x74, 0xfc, // 72 (0x48) + 0x8c, 0xdc, 0xdc, 0xdc, 0xdc, 0xdc, 0x8c, 0xfc, // 73 (0x49) + 0xf4, 0xf4, 0xf4, 0xf4, 0xf4, 0x74, 0x8c, 0xfc, // 74 (0x4a) + 0x74, 0x6c, 0x5c, 0x3c, 0x5c, 0x6c, 0x74, 0xfc, // 75 (0x4b) + 0x7c, 0x7c, 0x7c, 0x7c, 0x7c, 0x7c, 0x04, 0xfc, // 76 (0x4c) + 0x74, 0x24, 0x54, 0x74, 0x74, 0x74, 0x74, 0xfc, // 77 (0x4d) + 0x74, 0x34, 0x34, 0x54, 0x64, 0x64, 0x74, 0xfc, // 78 (0x4e) + 0x8c, 0x74, 0x74, 0x74, 0x74, 0x74, 0x8c, 0xfc, // 79 (0x4f) + 0x0c, 0x74, 0x74, 0x0c, 0x7c, 0x7c, 0x7c, 0xfc, // 80 (0x50) + 0x8c, 0x74, 0x74, 0x74, 0x74, 0x6c, 0x94, 0xfc, // 81 (0x51) + 0x0c, 0x74, 0x74, 0x0c, 0x74, 0x74, 0x74, 0xfc, // 82 (0x52) + 0x8c, 0x74, 0x7c, 0x8c, 0xf4, 0x74, 0x8c, 0xfc, // 83 (0x53) + 0x04, 0xdc, 0xdc, 0xdc, 0xdc, 0xdc, 0xdc, 0xfc, // 84 (0x54) + 0x74, 0x74, 0x74, 0x74, 0x74, 0x74, 0x8c, 0xfc, // 85 (0x55) + 0x74, 0x74, 0x74, 0x74, 0xac, 0xac, 0xdc, 0xfc, // 86 (0x56) + 0x74, 0x74, 0x74, 0x74, 0x54, 0x24, 0x74, 0xfc, // 87 (0x57) + 0x74, 0x74, 0xac, 0xdc, 0xac, 0x74, 0x74, 0xfc, // 88 (0x58) + 0x74, 0x74, 0xac, 0xdc, 0xdc, 0xdc, 0xdc, 0xfc, // 89 (0x59) + 0x04, 0xf4, 0xec, 0xdc, 0xbc, 0x7c, 0x04, 0xfc, // 90 (0x5a) +}; diff --git a/graphics.c b/graphics.c new file mode 100644 index 0000000..15f4d3b --- /dev/null +++ b/graphics.c @@ -0,0 +1,528 @@ +/* graphics.c + Copyright (C) 2026 Pierre Sarrazin + + 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 . +*/ + +#include "graphics.h" + + +// Uncomment to send printf() et al. to the Becker port +// instead of the lower-right text window. +// +//#define TRACES_TO_BECKER_PORT + + +static const byte rgbPaletteValues[NUM_COLORS] = +{ +#define PALETTE_ELEMENT(name, rgbCode, cmpCode) rgbCode, +#include "palette.h" +#undef PALETTE_ELEMENT +}; + + +static const byte cmpPaletteValues[NUM_COLORS] = +{ +#define PALETTE_ELEMENT(name, rgbCode, cmpCode) cmpCode, +#include "palette.h" +#undef PALETTE_ELEMENT +}; + + +// Points to either rgbPaletteValues[] or cmpPaletteValues[]. +// +static const byte *currentPaletteValues = rgbPaletteValues; + + +static const byte colorIndexToByte[NUM_COLORS] = +{ + 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, + 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff +}; + + +static struct +{ + byte curRow; // 0..TEXT_SCREEN_HEIGHT-1 + byte curCol; // 0..TEXT_SCREEN_WIDTH-1 +} textWindow; + + + +// color: Palette index (0..15). +// +void +hcls(byte color) +{ + byte b = colorIndexToByte[color]; + memset16(GRAPHICS_START, ((word) b << 8) | b, NUM_GRAPHICS_BLOCKS * BLOCK_SIZE / 2); +} + + +void consoleOutHookGraphics(void); + + +static void +setPaletteFromCurrentArray(void) +{ + memcpy((void *) 0xFFB0, currentPaletteValues, NUM_COLORS); + poke(0xFF9A, currentPaletteValues[PAL_SCREEN_BG]); // border color (0..63) +} + + +void +setPalette(BOOL monitorIsRGB) +{ + currentPaletteValues = (monitorIsRGB ? rgbPaletteValues : cmpPaletteValues); + setPaletteFromCurrentArray(); +} + + +void +alternatePalettes(void) +{ + setPalette(currentPaletteValues == cmpPaletteValues); +} + + +void +showGraphicsMode(void) +{ + setPaletteFromCurrentArray(); + + poke(0xFF90, 0x4C); // reset CoCo 2 compatible bit + poke(0xFF98, 0x80); // graphics mode + poke(0xFF99, 0b00011010); // 256x192, 16 colors + + // Tell the GIME chip that the memory at FIRST_GRAPHICS_BLOCK is the screen. + pokeWord(0xFF9D, (word) FIRST_GRAPHICS_BLOCK << 10); + + // Redirect printf() et al. to the software text screen. + setConsoleOutHook(consoleOutHookGraphics); +} + + +void +setupGraphicsMode(void) +{ + for (byte i = 0; i < NUM_GRAPHICS_BLOCKS; ++i) + mmuSet(FIRST_GRAPHICS_BANK + i, FIRST_GRAPHICS_BLOCK + i); + + hcls(PAL_SCREEN_BG); // empty the screen before showing it + + textWindow.curRow = TEXT_WIN_TOP; + textWindow.curCol = TEXT_WIN_LEFT; +} + + +asm byte * +getPixelAddr(byte x, byte y) +{ + #if 0 /* Original C code. */ + return (byte *) (GRAPHICS_START + y * (word) BYTES_PER_ROW + (x / 2)); + #else + asm + { + ; 'x' is in B, as per __gcccall. + lsrb ; x / 2 + ldx #GRAPHICS_START + abx + ldb 3,s ; y + lda #BYTES_PER_ROW + mul ; D = y * (word) BYTES_PER_ROW + leax d,x ; add to GRAPHICS_START + x / 2 + ; Return value left in X as per __gcccall. + } + #endif +} + + +static const byte sixteenColorModeMasks[2] = { 0b00001111, 0b11110000 }; +// Expensive if used to set many pixels. +// Assumes 256x192x16. +// +void +setPixel(byte x, byte y, byte color) +{ + byte mask = sixteenColorModeMasks[x & 1]; // the zero bits are where 'color' will go + byte *changedByte = getPixelAddr(x, y); + #if 0 //ndef NDEBUG + if (changedByte < GRAPHICS_START || changedByte >= GRAPHICS_END) + { + printf("!setPixel(%u,%u,%u):%p,%p,%p.", x, y, color, changedByte, GRAPHICS_START, GRAPHICS_END); + for (;;) + ; + } + #endif + byte colorByte = (x & 1 ? color : (color << 4)); + *changedByte = *changedByte & mask | colorByte; +} + + +byte +getPixel(byte x, byte y) +{ + byte mask = sixteenColorModeMasks[x & 1]; + byte *targetByte = getPixelAddr(x, y); + return x & 1 ? *targetByte & 0x0F : (*targetByte >> 4); +} + + +void +hline(byte left, byte right, byte row, byte colorIndex) +{ + const byte oddCol = left & 1; + byte mask = sixteenColorModeMasks[oddCol]; // the zero bits are where 'colorIndex' will go + byte *changedByte = getPixelAddr(left, row); + const byte evenColorByte = colorIndex << 4; + const byte oddColorByte = colorIndex; + const byte colorByteXorValue = oddColorByte ^ evenColorByte; + byte colorByte = (oddCol ? oddColorByte : evenColorByte); + + for ( ; left <= right; ++left) + { + *changedByte = *changedByte & mask | colorByte; + + if (left & 1) // if just processed odd horiz. coord + ++changedByte; // then next pixel is in next byte + + mask = ~mask; // alternate between 0xF0 and 0x0F + + colorByte ^= colorByteXorValue; // alternate betweenoddColorByte and evenColorByte + } +} + + +void +vline(byte top, byte bottom, byte column, byte colorIndex) +{ + assert(top < SCRN_HEIGHT); + assert(bottom < SCRN_HEIGHT); + assert(colorIndex < NUM_COLORS); + + const byte oddCol = column & 1; + const byte mask = sixteenColorModeMasks[oddCol]; // the zero bits are where 'colorIndex' will go + const byte colorByte = (oddCol ? colorIndex : (colorIndex << 4)); + byte *changedByte = getPixelAddr(column, top); + + for ( ; top <= bottom; ++top, changedByte += BYTES_PER_ROW) + *changedByte = *changedByte & mask | colorByte; +} + + +void +draw6ByteWideRectangle(byte leftPosInBytes, + byte upperRowInPixels, + byte heightInPixels, + byte colorIndex) +{ + byte byteToWrite = colorIndexToByte[colorIndex]; + word wordToWrite = ((word) byteToWrite << 8) | byteToWrite; + byte *bytePtr = (byte *) (GRAPHICS_START + upperRowInPixels * (word) BYTES_PER_ROW + leftPosInBytes); + for (byte row = 0; row < heightInPixels; ++row, bytePtr += BYTES_PER_ROW) + { + * (word *) bytePtr = wordToWrite; + * (word *) (bytePtr + 2) = wordToWrite; + * (word *) (bytePtr + 4) = wordToWrite; + } +} + + +void +drawRect(byte leftPosInPixels, + byte upperRowInPixels, + byte widthInPixels, + byte heightInPixels, + byte colorIndex) +{ + byte right = leftPosInPixels + widthInPixels - 1; + for ( ; heightInPixels--; ++upperRowInPixels) + hline(leftPosInPixels, right, upperRowInPixels, colorIndex); +} + + +void +drawBox(byte leftX, byte topY, byte rightX, byte bottomY, byte colorIndex) +{ + hline(leftX, rightX, topY, colorIndex); + hline(leftX, rightX, bottomY, colorIndex); + vline(topY, bottomY, leftX, colorIndex); + vline(topY, bottomY, rightX, colorIndex); +} + + +// Colors currently used by writeCharEx(). +// +static byte foreColorByte = PAL_PROMPTS | (PAL_PROMPTS << 4); +static byte backColorByte = PAL_SCREEN_BG | (PAL_SCREEN_BG << 4); + + +// Uses foreColorByte and backColorByte. +// +static void +writeCharEx(const byte font[], byte numRows, byte numColumns, + byte x, byte y, + word glyphIndex) +{ + const byte *glyph = &font[glyphIndex << 3]; + const byte firstMaskInRow = sixteenColorModeMasks[x & 1]; + byte *changedByte = getPixelAddr(x, y); + + for (byte row = 0; row < numRows; ++row) + { + byte glyphByte = glyph[row]; + + byte mask = firstMaskInRow; // the zero bits are where the 4-bit pixel will go + + byte *firstChangedByteInRow = changedByte; + + for (byte col = 0; col < numColumns; ++col, glyphByte <<= 1) + { + byte colorByte = (glyphByte & 0x80) ? backColorByte : foreColorByte; // 2 nybbles set + + *changedByte = *changedByte & mask | (colorByte & ~mask); + + mask = ~mask; // 11110000 <-> 00001111: next pixel will go in other nybble + if (mask == 0b00001111) // if next pixel will go in high nybble + ++changedByte; // next pixel will go in next byte + } + + changedByte = firstChangedByteInRow + BYTES_PER_ROW; + } +} + + +void +writeTileCharAtPixelPosWithColors(byte x, byte y, byte tileType, byte foreColorIndex, byte backColorIndex) +{ + byte f = foreColorByte, b = backColorByte; + foreColorByte = foreColorIndex | (foreColorIndex << 4); + backColorByte = backColorIndex | (backColorIndex << 4); + + writeCharEx((const byte *) FONT_5x8_BUFFER, 7, 5, x, y, tileType - 1); + + foreColorByte = f; + backColorByte = b; +} + + +void +writeCharAtPixelPos(byte x, byte y, char asciiCode) +{ + writeCharEx((const byte *) FONT_4x8_BUFFER, CHAR_HEIGHT, CHAR_WIDTH - 1, + x, y, (byte) asciiCode - 32); +} + + +void +writeStringAt(byte textCol, byte textRow, const char *str) +{ + byte startCol = textCol; + for ( ; *str; ++str) + { + if (*str == '\n') + { + textCol = startCol; + ++textRow; + } + else + writeCharAt(textCol++, textRow, *str); + } +} + + +void +writeDecimalAt(byte textCol, byte textRow, unsigned value) +{ + char str[6]; + utoa10(value, str); + writeStringAt(textCol, textRow, str); +} + + +#ifndef TRACES_TO_BECKER_PORT + + +// N.B.: Assumes that the text window is at the right of the screen. +// +static void +scrollTextWindowUp(void) +{ + byte homeX = TEXT_WIN_LEFT * CHAR_WIDTH; // in pixels + byte *p = getPixelAddr(homeX, TEXT_WIN_TOP * CHAR_HEIGHT); + byte numBytesToCopyPerRow = (byte) (256 - homeX) / 2; // assumes homeX > 0 and that text win at right of scrn + byte y; + for (y = TEXT_WIN_TOP * CHAR_HEIGHT; y < SCRN_HEIGHT - CHAR_HEIGHT; ++y, p += BYTES_PER_ROW) + { + byte *dest = p; + if (homeX & 1) // if left-most byte of text window is not fully part of text window + { + dest[0] = (dest[0] & 0b11110000) | (dest[BYTES_PER_ROW * (word) CHAR_HEIGHT] & 0b00001111); + ++dest; // move on to next byte + } + memcpy(dest, dest + (BYTES_PER_ROW * (word) CHAR_HEIGHT), numBytesToCopyPerRow); + } + byte colorByte = (PAL_SCREEN_BG << 4) | PAL_SCREEN_BG; + for ( ; y < SCRN_HEIGHT; ++y, p += BYTES_PER_ROW) // clear bottom + { + byte *dest = p; + if (homeX & 1) + { + dest[0] = (dest[0] & 0b11110000) | PAL_SCREEN_BG; + ++dest; // move on to next byte + } + memset(dest, colorByte, numBytesToCopyPerRow); + } +} + + +#endif /* TRACES_TO_BECKER_PORT */ + + +// Called by printf() and putchar() when in graphics mode. +// The character to be printed is in register A. +// Must preserve B and X. +// +void +consoleOutHookGraphics(void) +{ + #ifdef TRACES_TO_BECKER_PORT + asm + { + sta $FF42 + } + #else + char ch; + asm + { + pshs x,b ; must be preserved + sta :ch ; character to write + } + + byte goToNewLine = FALSE; + switch (ch) + { + case '\r': + // Write spaces until current line filled. + for (byte col = textWindow.curCol; col < TEXT_WIN_LEFT + TEXT_WIN_WIDTH; ++col) + writeCharAt(col, textWindow.curRow, ' '); + goToNewLine = TRUE; + break; + default: + if ((byte) ch >= ' ' && (byte) ch <= 127) // DEL rendered as filled rectangle + { + writeCharAt(textWindow.curCol, textWindow.curRow, ch); + if (++textWindow.curCol == TEXT_WIN_LEFT + TEXT_WIN_WIDTH) // if end of row reached + goToNewLine = TRUE; + } + } + + if (goToNewLine) + { + textWindow.curCol = TEXT_WIN_LEFT; + if (textWindow.curRow < (byte) (TEXT_WIN_TOP + TEXT_WIN_HEIGHT - 1)) // if not on last row + ++textWindow.curRow; + else + scrollTextWindowUp(); + } + + asm + { + puls b,x + } + #endif +} + + +void +getCurrentTextWindowPos(byte *textCol, byte *textRow) +{ + *textCol = textWindow.curCol; + *textRow = textWindow.curRow; +} + + +static byte *hardwareTextCursor = (byte *) HW_TEXT_SCREEN_BUFFER; + + +// Called by printf() and putchar() when in hardware text mode. +// The character to be printed is in register A. +// Must preserve B and X. +// +// Does NOT support scrolling. The cursor must not go beyond last row. +// +static asm __norts__ void +hardwareTextScreenConsoleOut(void) +{ + asm + { + pshs x,b + ldx :hardwareTextCursor + cmpa #13 + beq @cr + sta ,x+ + bra @done +@cr +; Begin hardwareTextCursor back to start of current row, then to start of next row. + ldd #-HW_TEXT_SCREEN_BUFFER + leax d,x ; X now offset from HW_TEXT_SCREEN_BUFFER +; Divide X by 40 by subtraction, to get the remainder (0..39) + bra @divBy40Cond +@divBy40Loop + leax -HW_TEXT_SCREEN_WIDTH,x +@divBy40Cond + cmpx #HW_TEXT_SCREEN_WIDTH + bhs @divBy40Loop ; loop if still not in first row +; + tfr x,d ; get remainder (column number) in B + negb ; negate column number + ldx :hardwareTextCursor + leax b,x ; put cursor back at start of row (signed operation) + leax HW_TEXT_SCREEN_WIDTH,x ; put cursor at start of next row +@done + stx :hardwareTextCursor +@ret + puls b,x,pc + } +} + + +void +showHardwareTextScreen(void) +{ + // Set CoCo 3 hi res text mode. + // Must be consistent with HW_TEXT_SCREEN_WIDTH, HW_TEXT_SCREEN_HEIGHT, HW_TEXT_SCREEN_BUFFER. + // + * (byte *) 0xFF90 = 0x4C; // reset CoCo 2 compatible bit + * (byte *) 0xFF98 = 0x03; // text mode + * (byte *) 0xFF99 = 0b00000100; // 192 lines per field, 40x24 grid, NO color attributes + * (byte *) 0xFF9A = currentPaletteValues[PAL_SCREEN_BG]; + * (unsigned *) 0xFF9D = 0xFC00; // specifies $7E000 as base address; mapped to HW_TEXT_SCREEN_BUFFER + + // Set the foreground and background colors through palette slots 1 and 0. + // + * (byte *) 0xFFB0 = currentPaletteValues[PAL_SCREEN_BG]; + * (byte *) 0xFFB1 = currentPaletteValues[PAL_PROMPTS]; + + setConsoleOutHook(hardwareTextScreenConsoleOut); +} + + +void +clearHardwareTextScreen(void) +{ + memset16((void *) HW_TEXT_SCREEN_BUFFER, 0x2020, HW_TEXT_SCREEN_WIDTH * HW_TEXT_SCREEN_HEIGHT / 2); + + hardwareTextCursor = (byte *) HW_TEXT_SCREEN_BUFFER; +} diff --git a/graphics.h b/graphics.h new file mode 100644 index 0000000..656efe1 --- /dev/null +++ b/graphics.h @@ -0,0 +1,154 @@ +/* graphics.h + Copyright (C) 2026 Pierre Sarrazin + + 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 . +*/ + +#ifndef _H_graphics +#define _H_graphics + +#include "defs.h" + + +// Define names for the palette slots, e.g., PAL_SCREEN_BG for +// the screen background color. +// +enum +{ +#define PALETTE_ELEMENT(name, rgbCode, cmpCode) CONCAT(PAL_, name), +#include "palette.h" +#undef PALETTE_ELEMENT +}; + + +// Displays the 40x24 no-color text screen. +// Redirects printf() et al. to it. +// Scrolling is not supported. The cursor must not go beyond the last row. +// Call showGraphicsMode() to go to the graphics screen. +// +void showHardwareTextScreen(void); + + +// Also homes the cursor. +// +void clearHardwareTextScreen(void); + + +void hcls(byte color); + + +// Sets MMU pages to point to the graphics blocks. +// Clears the graphics screen. +// Homes the cursor used by printf() et al., which get redirected +// to a part of the graphics screen. +// +void setupGraphicsMode(); + + +// Initializes the 16 palette slots according to monitorIsRGB. +// If it is false, a composite monitor is assumed. +// If this function is never called, the default palette is RGB. +// +void setPalette(BOOL monitorIsRGB); + + +// Switches between the RGB and CMP palettes. +// +void alternatePalettes(void); + + +// Shows the graphics mode that was set up by setupGraphicsMode(), +// which must have been called before this function can be called. +// Redirects printf() et al. to a part of the graphics screen. +// Does not move the cursor. +// +void showGraphicsMode(void); + + +// Returns the address of the byte that contains the pixel at (x, y). +// x, y: Positions in pixels. +// +__gcccall byte *getPixelAddr(byte x, byte y); + + +void setPixel(byte x, byte y, byte color); + + +byte getPixel(byte x, byte y); + + +void hline(byte left, byte right, byte row, byte colorIndex); + + +void vline(byte top, byte bottom, byte column, byte colorIndex); + + +void draw6ByteWideRectangle(byte leftPosInBytes, + byte upperRowInPixels, + byte heightInPixels, + byte colorIndex); + +// Draws a full rectangle. +// +void drawRect(byte leftPosInPixels, + byte upperRowInPixels, + byte widthInPixels, + byte heightInPixels, + byte colorIndex); + + +// Draws an empty box. +// N.B.: rightX and bottomY are positions, not dimensions. +// +void drawBox(byte leftX, byte topY, byte rightX, byte bottomY, byte colorIndex); + + +// Writes a character in a 4x8 font at a pixel-precise position. +// x: 0..251. +// y: 0..184. +// asciiCode: 0..127. +// +void writeCharAtPixelPos(byte x, byte y, char asciiCode); + + +// Writes a character in a 4x8 font at a text grid position. +// textCol: 0..50. +// textRow: 0..23. +// asciiCode: 0..127. +// +#define writeCharAt(textCol, textRow, asciiCode) (writeCharAtPixelPos((textCol) * CHAR_WIDTH, (textRow) * CHAR_HEIGHT, (asciiCode))) + + +// The text must not go beyond the row it starts on. +// '\n' goes to the next line. The text must not go below +// the bottom of the text window. +// +void writeStringAt(byte textCol, byte textRow, const char *str); + + +void writeDecimalAt(byte textCol, byte textRow, unsigned value); + + +// Returns a position in a 51x24 grid. +// +void getCurrentTextWindowPos(byte *textCol, byte *textRow); + + +// Writes a capital letter in a tile-specific font. +// tileType: 1..26. +// +void writeTileCharAtPixelPosWithColors(byte x, byte y, byte tileType, byte foreColorIndex, byte backColorIndex); + + +#endif /* _H_graphics */ diff --git a/main.c b/main.c new file mode 100644 index 0000000..25fa6d7 --- /dev/null +++ b/main.c @@ -0,0 +1,2084 @@ +/* main.c + Copyright (C) 2026 Pierre Sarrazin + + 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 . +*/ + +#include "graphics.h" +#include "file.h" +#include "dict.h" +#include "GameState.h" +#include "CursorBlinker.h" +#include "GamePlayer.h" +#include "PositionIterator.h" +#include "WordSearch.h" + +#include "Keyboard.h" /* bcontrol library */ +#include "Player.h" /* bsound library */ + +#define SCRIPTED_KEYS + + +// Must be consistent with the previous enum. +// +static const byte colorBySquareType[] = +{ + PAL_BOARD_BG, + PAL_DOUBLE_WORD, + PAL_TRIPLE_WORD, + PAL_DOUBLE_WORD, + PAL_TRIPLE_LETTER, + PAL_DOUBLE_LETTER +}; + + +static DECBDrive drives[NUM_DISK_DRIVES]; + +static Keyboard keyboard; + + +// For sounds. +// +static Player soundPlayer; + + +enum +{ + KEY_UP = '^', + KEY_DOWN = 10, + KEY_LEFT = 8, + KEY_RIGHT = 9, + KEY_ENTER = 13, + KEY_CANCEL = 3, + KEY_BACKSPACE = 8, + KEY_PASS = 'P', + KEY_QUIT = 'Q', + KEY_HELP = '?', // show help from menu shown by Break key + KEY_CONTINUE = 'C', + KEY_MONITOR = 'M', // switches between RGB and CMP palettes +}; + +static byte *textScrnWritePos; // current address to write to in the 32x16 screen + +static word timer; // 60 Hz tick counter + +static unsigned seed; // seed passed to srand() + +static byte difficultyLevel = LEVEL_EASY; // LEVEL_* value +static BOOL userPlaysFirst = TRUE; + + +// Wait a certain number of sixtieths of a second. +// +static void +waitTicks(word numTicks) +{ + const word start = timer; + while (timer - start < numTicks) + ; +} + + +#ifdef SCRIPTED_KEYS +// The characters defined in the following array are typed automatically. +static const char scriptedKeys[] = ""; +static size_t scriptedKeyIndex = 0; // index into scriptedKeys[] + +byte pollKeyboard(void) +{ + //printf("KEYS:[%s]\n", scriptedKeys); + //if (scriptedKeyIndex < 5) + // printf("[%u %u]", scriptedKeyIndex, scriptedKeys[scriptedKeyIndex]); + if (scriptedKeys[scriptedKeyIndex]) + { + //printf("SCRIPTED: %u %u\n", scriptedKeyIndex, scriptedKeys[scriptedKeyIndex]); + return (byte) scriptedKeys[scriptedKeyIndex++]; + } + return Keyboard_poll(&keyboard); +} +#else +#define pollKeyboard() (Keyboard_poll(&keyboard)) +#endif + + +static byte +pollKeyNoLowerCase(void) +{ + byte key = pollKeyboard(); + if (!key) + return 0; + return (byte) toupper((char) key); +} + + +// Keyboard_init() must have been called. +// +void +pause(void) +{ + while (pollKeyboard() == 0) + ; +} + + +void +clearTextScreen(void) +{ + memset16((void *) TEXT_SCREEN, 0x6060, 512 / 2); + textScrnWritePos = TEXT_SCREEN; +} + + +// vector: e.g., 0xFFF8 for IRQ. +// +void setISR(void *vector, ISR newRoutine) +{ + byte *isr = * (byte **) vector; + *isr = 0x7E; // JMP extended + * (ISR *) (isr + 1) = newRoutine; +} + + +// N.B.: Player_init() must have been called before this ISR is allowed to be invoked. +// +interrupt asm void irqISR() +{ + asm + { +_dskcon_irqService IMPORT + ldb $FF03 + bpl @done // do nothing if 63.5 us interrupt + ldb $FF02 // 60 Hz interrupt. Reset PIA0, port B interrupt flag. +; + lbsr Player_defaultIRQService // Player_init() must have been called +; + ldd :timer + addd #1 + std :timer + lbsr _dskcon_irqService // routine provided by decbfile library +; +@done + } +} + + +asm void +consoleOutHook32x16(void) +{ + asm + { + pshs x,b // must be preserved + ldx :textScrnWritePos + cmpa #13 + beq @newline +; + bsr @convertASCIITo6847Code + sta ,x+ // no check for end of screen + bra @done +; +@convertASCIITo6847Code + cmpa #64 + blo @typo // typographical char + cmpa #96 + blo @conversionDone // upper-case letter + cmpa #128 + bhs @conversionDone // graphical char + suba #96 // lower-case letter +@conversionDone + rts +@typo + adda #64 + rts +; +@scrollUp + ldx #TEXT_SCREEN +@scrollUpLoop + ldd 32,x // load 2 bytes from row below + std ,x++ // store in current row and advance + cmpx #TEXT_SCREEN+480 + blo @scrollUpLoop + ldd #$6060 // 2 spaces +@fillLastRow + std ,x++ + cmpx #TEXT_SCREEN+512 + blo @fillLastRow + rts +; +@newline + tfr x,d + andb #$E0 // carriage return + addd #32 // line feed + tfr d,x +@done + cmpx #TEXT_SCREEN+512 + blo @notAtEndOfScreen + bsr @scrollUp + ldx #TEXT_SCREEN+480 +@notAtEndOfScreen + stx :textScrnWritePos + puls b,x + } +} + + +#if 0 +typedef struct WordPrinter +{ + word numWordsInBlock; + word wordIndexInBlock; +} WordPrinter; + + +// On a new block, initialize the WordPrinter at userData. +// +static byte +printNextBlock(word numWordsInBlock, void *userData) +{ + WordPrinter *wp = (WordPrinter *) userData; + wp->numWordsInBlock = numWordsInBlock; + wp->wordIndexInBlock = 0; + printf("\n""BLOCK HAS %u WORDS:", numWordsInBlock); + return DICT_ITER_LIST_WORDS; +} + + +// On each word of the current block. +// +static BOOL +printWord(const char *currentWord, byte currentWordLength, void *userData) +{ + WordPrinter *wp = (WordPrinter *) userData; + + // Print the last few words of the block. + if (wp->wordIndexInBlock >= wp->numWordsInBlock - 5) + printf(" %u=%s", wp->wordIndexInBlock, currentWord); + + ++wp->wordIndexInBlock; + return TRUE; // continue iteration +} + + +void +showDictionary(void) +{ + printf("PRESS [ENTER] TO SEE THE WORDS:\n"); + pause(); + WordPrinter wordPrinter = { 0, 0 }; + iterateDictionary(printNextBlock, printWord, 0, &wordPrinter); + printf("\nTHE END. PRESS [ENTER] TO CONTINUE."); + pause(); + clearTextScreen(); +} +#endif + + +// Must be as long as the width in chars of the text window where writePaddingString() writes, +// i.e. TEXT_WIN_WIDTH. +// +static const char *spaces = " "; + + +// str: Must not be empty. +// +static void +writePaddingString(byte row, const char *str) +{ + writeStringAt(TEXT_WIN_LEFT, row, str); + byte len = (byte) strlen(str); + writeStringAt(TEXT_WIN_LEFT + len, row, spaces + len); +} + + +static void +writeInstructions(const char *line0, + const char *line1, + const char *line2, + const char *line3, + const char *line4) +{ + // The area used here must be consistent with clearInstructions(). + writePaddingString(TEXT_INSTR_ROW + 0, line0); + writePaddingString(TEXT_INSTR_ROW + 1, line1); + writePaddingString(TEXT_INSTR_ROW + 2, line2); + writePaddingString(TEXT_INSTR_ROW + 3, line3); + writePaddingString(TEXT_INSTR_ROW + 4, line4); +} + + +// Clears the window used by writeInstructions(). +// +static +void clearInstructions(void) +{ + byte *destPixelRow = getPixelAddr(TEXT_WIN_LEFT * (word) CHAR_WIDTH, + TEXT_INSTR_ROW * (word) CHAR_HEIGHT); + const byte winWidthInBytes = (SCRN_WIDTH - ((TEXT_WIN_LEFT * (word) CHAR_WIDTH) & ~7)) / 2; + const byte byteToClearWith = PAL_SCREEN_BG | (PAL_SCREEN_BG << 4); + + for (byte row = 5 * CHAR_HEIGHT; row--; destPixelRow += BYTES_PER_ROW) + memset(destPixelRow, byteToClearWith, winWidthInBytes); +} + + +static void +writeResult(const char *line0, + const char *line1, + const char *line2, + const char *line3) +{ + writePaddingString(TEXT_RESULT_ROW + 0, line0); + writePaddingString(TEXT_RESULT_ROW + 1, line1); + writePaddingString(TEXT_RESULT_ROW + 2, line2); + writePaddingString(TEXT_RESULT_ROW + 3, line3); +} + + +static void +clearResult(void) +{ + writeResult("", "", "", ""); +} + + +static void +writeScore(const GamePlayer *currentPlayer) +{ + byte row = TEXT_SCORE_ROW + (currentPlayer->isComputer ? 1 : 0); + char str[TEXT_WIN_WIDTH + 1]; + sprintf(str, "%s: %5u pts", + currentPlayer->isComputer ? "Me " : "You", + currentPlayer->score); + writeStringAt(TEXT_WIN_LEFT, row, str); +} + + +void +printRackToTextScreen(const byte rack[RACK_SIZE]) +{ + printf("RACK: ["); + for (byte i = 0; i < RACK_SIZE; ++i) + { + char c = GameState_getTileTypeChar(rack[i]); + putchar(c == ' ' ? '.' : c); + } + printf("]\n"); +} + + +void +showUserRack(const byte rack[RACK_SIZE]) +{ + for (byte i = 0, col = TEXT_WIN_LEFT; i < RACK_SIZE; ++i, col += 2) + writeCharAt(col, 1, GameState_getTileTypeChar(rack[i])); +} + + +static byte +rackHasLetter(byte rack[RACK_SIZE], char asciiLetter) +{ + if (asciiLetter >= 'A' && asciiLetter <= 'Z') + { + byte requiredTileType = (byte) (asciiLetter - '@'); // 1..26 + for (byte i = 0; i < RACK_SIZE; ++i) + if (rack[i] == requiredTileType) + return i; + } + return 255; +} + + +byte +rackHasBlank(byte rack[RACK_SIZE]) +{ + for (byte i = 0; i < RACK_SIZE; ++i) + if (rack[i] == TILE_TYPE_BLANK) + return i; + return 255; +} + + +#define copyRack(destRack, srcRack) (memcpy((destRack), (srcRack), RACK_SIZE)) + + +static void +addToRack(byte rack[RACK_SIZE], byte tileType) +{ + for (byte i = 0; i < RACK_SIZE; ++i) + if (rack[i] == TILE_TYPE_NONE) + { + rack[i] = tileType; + break; + } +} + + +#if 0 /* Debugging. */ +void +dumpRack(byte rack[RACK_SIZE]) +{ + for (byte i = 0; i < RACK_SIZE; ++i) + putchar(rack[i] + '@'); +} +#endif + + +static word randomWord = 0; // 0..$0FFF (the 12 low bits of the word) +static byte numNybblesLeft = 0; + + +// Returns a random value between 0..15. +// Optimizes the number of calls to rand(). +// Depends on the seed passed to srand(). +// +static byte +generateRandomNybble(void) +{ + if (numNybblesLeft == 0) + { + randomWord = (word) rand() & 0x0FFF; // keep 12 of the 15 low bits + numNybblesLeft = 3; + } + + byte newNybble = (byte) randomWord & 0x0F; + randomWord >>= 4; + --numNybblesLeft; + return newNybble; +} + + +typedef struct PositionedChar +{ + byte col; // column of 51x24 screen + char ch; // character to print +} PositionedChar; + + +static const PositionedChar ellipsisAnimationStates[6] = +{ + { 2, '.' }, + { 2, ' ' }, + { 1, ' ' }, + { 0, ' ' }, + { 0, '.' }, + { 1, '.' }, +}; + + +typedef struct EllipsisAnimation +{ + byte counter; + byte rate; // controls speed of animation (value to be reached by 'counter') + byte state; // 0..6 re: ellipsisAnimationStates[] + byte firstCol; // 1st column of the 3 dots + byte row; // row of the 3 dots +} EllipsisAnimation; + + +static EllipsisAnimation ellipsisAnimation; + + +static void +EllipsisAnimation_init(byte firstCol, byte row, byte rate) +{ + assert(firstCol < TEXT_SCREEN_WIDTH); + assert(row < TEXT_SCREEN_HEIGHT); + assert(rate > 0); + + ellipsisAnimation.counter = 0; + ellipsisAnimation.rate = rate; + ellipsisAnimation.state = 0; + ellipsisAnimation.firstCol = firstCol; + ellipsisAnimation.row = row; +} + + +// Callback invoked by some dictionary search functions to indicate progress. +// +static void +EllipsisAnimation_update(void) +{ + assert(ellipsisAnimation.firstCol >= TEXT_WIN_LEFT); + + if (++ellipsisAnimation.counter < ellipsisAnimation.rate) + return; // not time yet to change state + ellipsisAnimation.counter = 0; + + if (++ellipsisAnimation.state >= 6) + ellipsisAnimation.state = 0; + + const PositionedChar *pc = &ellipsisAnimationStates[ellipsisAnimation.state]; + writeCharAt(ellipsisAnimation.firstCol + pc->col, ellipsisAnimation.row, pc->ch); +} + + +// May be useful for debugging. +// +#define rejectWord(rejectedWord) (TRUE) + + +//static word numSkippedWords; // for testing + + +// currentWord: ASCII word to be checked. +// userData: Must point to a WordSearch object. +// The rack in the WordSearch may contain blank tiles. Tiles that get used are removed from it. +// No tile in 'rack' is used twice. +// +static BOOL +checkIfWordPlayableWithRack(const char *currentWord, byte currentWordLength, void *userData) +{ + WordSearch *ws = (WordSearch *) userData; + ++ws->numWordsProcessed; + + // If the difficulty level is easy, skip some of the dictionary's words, + // to simulate a player who does not know the entire dictionary by heart. + // + if (ws->difficultyLevel == LEVEL_EASY && generateRandomNybble() < 14) + { + //++numSkippedWords; + return rejectWord(currentWord); // let iterateDictionary() continue to next word + } + + // Show a progress indicator. + // + static byte timeToAnimate = 0; + if (++timeToAnimate == 0) + EllipsisAnimation_update(); + + // Make a copy of the rack so that we can take tiles out of it during the test. + // + byte workRack[RACK_SIZE]; + copyRack(workRack, ws->rack); + + // For each letter of 'currentWord', look up this letter in the rack. + // + byte firstLetterIndexNotInRack = 255; + BOOL fail = FALSE; + char letter; + byte letterIndex; + for (letterIndex = 0; (letter = currentWord[letterIndex]) != '\0'; ++letterIndex) + { + byte letterTileTypeBehindBlank = TILE_TYPE_NONE; + + byte rackIndex = rackHasLetter(workRack, letter); + if (rackIndex == 255) // if rack does not have 'letter' nor a blank tile for it + { + rackIndex = rackHasBlank(workRack); + if (rackIndex == 255) // if no blank + { + if (firstLetterIndexNotInRack != 255) // if already seen non-playable letter + fail = TRUE; // program not strong enough to try to play this word + firstLetterIndexNotInRack = letterIndex; // one letter not in rack is OK: continue + } + else + letterTileTypeBehindBlank = letter - '@'; + } + if (rackIndex != 255) // rack has 'letter' or blank tile for it: + workRack[rackIndex] = TILE_TYPE_NONE; // don't use this tile again in current test + + ws->letterTileTypeBehindBlank[letterIndex] = letterTileTypeBehindBlank; + } + if (fail) + { + //printf("WORD '%s' NOT PLAYABLE.\n", currentWord); + return rejectWord(currentWord); // let iterateDictionary() continue to next word + } + + // Here, all letters in 'currentWord' have been found in rack, with the possible + // exception of one, which would be currentWord[firstLetterIndexNotInRack]. + // + if (firstLetterIndexNotInRack != 255 && ws->allInRack) + return rejectWord(currentWord); // currentWord requires tile not in rack, and we want rack-only word + + #if 0 + printf("%s PLAYABLE", currentWord); + if (firstLetterIndexNotInRack != 255) + printf(" IF FREE %c", currentWord[firstLetterIndexNotInRack]); + else + printf(" ALL FROM RACK"); + printf("\n"); + #endif + + if (firstLetterIndexNotInRack != 255) + { + // currentWord is playable if the letter in currentWord[firstLetterIndexNotInRack] + // can be found on the board AND if there is room around that letter to the rest + // of 'currentWord'. + // + if (!GameState_tryHangWord(ws->gameState, + currentWord, currentWordLength, + currentWord[firstLetterIndexNotInRack], + firstLetterIndexNotInRack, + currentWordLength - firstLetterIndexNotInRack - 1, + &ws->foundWordHorizontal, &ws->foundWordRow, &ws->foundWordCol)) + return rejectWord(currentWord); // failed to hang currentWord to existing board letter, keep searching + + //printf("PUT %s AT %u,%u %s\n", + // currentWord, ws->foundWordRow, ws->foundWordCol, ws->foundWordHorizontal ? "HORIZ" : "VERT"); + } + else if (!ws->allInRack) + { + // The current word can be formed from the rack, but we want to be able to + // hang it to an existing tile on the board. Try to hang the word by each of + // its letters. + // + byte i; + for (i = 0; currentWord[i] != '\0'; ++i) + if (GameState_tryHangWord(ws->gameState, + currentWord, currentWordLength, + currentWord[i], + i, + currentWordLength - i - 1, + &ws->foundWordHorizontal, &ws->foundWordRow, &ws->foundWordCol)) + { + /*printf("PUT %s AT %u,%u %s (I=%u)\n", + currentWord, ws->foundWordRow, ws->foundWordCol, + ws->foundWordHorizontal ? "HORIZ" : "VERT", i);*/ + break; // success: can hang from currentWord[i] + } + if (currentWord[i] == '\0') + return rejectWord(currentWord); // failed to hang currentWord to existing board letter, keep searching + } + /*else + printf("PUT %s ALL FROM RACK\n", currentWord);*/ + + strcpy(ws->foundWord, currentWord); + copyRack(ws->rack, workRack); + return FALSE; // stop at first found, because no following word is longer +} + + +// Put the word on the board, assuming the board is empty. +// +void +chooseWordPositionOnEmptyBoard(const GameState *gs, const char *wordToPlace, + byte *outRow, byte *outCol, BOOL *outHorizontally) +{ + byte wordLen = (byte) strlen(wordToPlace); + + // Try to reach the right edge, where there is a triple word score. + // + *outCol = (wordLen <= (BOARD_SIZE / 2 + 1) + ? (byte) BOARD_SIZE / 2 + : BOARD_SIZE - (byte) wordLen); + *outRow = BOARD_SIZE / 2; + *outHorizontally = TRUE; // this function could one day also try vertical placement +} + + +// Computer search for a playable word. +// ws: Initialized WordSearch object. +// A search is successful if ws->foundWord is not an empty string. +// +static void +searchPlayableWord(byte rack[RACK_SIZE], + const GameState *gs, + BOOL allInRack, + WordSearch *ws) +{ + //numSkippedWords = 0; + + iterateDictionary(NULL, checkIfWordPlayableWithRack, 0, ws); + + //printf("Processed %u, skipped %u.\n", ws->numWordsProcessed, numSkippedWords); + + if (allInRack && *ws->foundWord) + chooseWordPositionOnEmptyBoard(gs, ws->foundWord, + &ws->foundWordRow, &ws->foundWordCol, + &ws->foundWordHorizontal); +} + + +static byte +setRightAndBottomColor(byte row, byte col, byte colorIndex, BOOL addingPerimeter) +{ + assert(row < BOARD_SIZE); + assert(col < BOARD_SIZE); + + byte leftX = col * TILE_WIDTH; + byte rightX = leftX + TILE_WIDTH; + byte topY = row * TILE_WIDTH; + byte bottomY = topY + TILE_WIDTH; + + // Box on the grid. + byte c = addingPerimeter ? colorIndex : PAL_BOARD_GRID; + vline(topY, bottomY, rightX, c); + hline(leftX, rightX, bottomY, c); + + // Box one pixel inside the grid. + byte origColorIndex = getPixel(leftX + 1, topY + 1); + vline(topY + 1, bottomY - 1, rightX - 1, colorIndex); + hline(leftX + 1, rightX - 1, bottomY - 1, colorIndex); + + return origColorIndex; +} + + +static byte +setSquarePerimeterColor(byte row, byte col, byte colorIndex, BOOL addingPerimeter) +{ + assert(row <= BOARD_SIZE); + assert(col <= BOARD_SIZE); + + byte leftX = col * TILE_WIDTH; + byte rightX = (col == BOARD_SIZE ? leftX + 1 : leftX + TILE_WIDTH); + byte topY = row * TILE_WIDTH; + byte bottomY = (row == BOARD_SIZE ? topY + 1 : topY + TILE_WIDTH); + + if (row == BOARD_SIZE || col == BOARD_SIZE) // if last row or last column + { + byte c0 = addingPerimeter ? colorIndex : PAL_BOARD_GRID; + byte c1 = addingPerimeter ? colorIndex : PAL_SCREEN_BG; + if (col == BOARD_SIZE) // if at right of board + { + vline(topY, bottomY, leftX, c0); + vline(topY, bottomY, rightX, c1); + } + else // at bottom of board + { + hline(leftX, rightX, topY, c0); + hline(leftX, rightX, bottomY, c1); + } + return 0xFF; // does not matter + } + + // Box on the grid. + drawBox(leftX, topY, rightX, bottomY, addingPerimeter ? colorIndex : PAL_BOARD_GRID); + + // Box one pixel inside the grid. + byte origColorIndex = getPixel(leftX + 1, topY + 1); + drawBox(leftX + 1, topY + 1, rightX - 1, bottomY - 1, colorIndex); + + return origColorIndex; +} + + +// tileType: A letter is drawn on the tile only if this is in 1..26, for A..Z. +// row, col: Board coordinates. +// +void +drawTileOnBoard(byte tileType, byte row, byte col, byte foreColorIndex, byte backColorIndex) +{ + assert(row < BOARD_SIZE); + assert(col < BOARD_SIZE); + + byte squareX = col * TILE_WIDTH; + byte squareY = row * TILE_WIDTH; + + // Draw tile background. + drawRect(squareX + 2, squareY + 2, TILE_WIDTH - 3, TILE_WIDTH - 3, backColorIndex); + + // Draw tile letter. (No foreground to draw if blank tile.) + if (tileType >= 1 && tileType <= 26) + writeTileCharAtPixelPosWithColors(squareX + 4, squareY + 3, tileType, + foreColorIndex, backColorIndex); +} + + +static byte +waitForKey(void) +{ + byte key; + while ((key = pollKeyNoLowerCase()) == 0) + ; + return key; +} + + +// Uses the global 'timer' variable. +// +static byte +readKeyFromBoardCursor(byte row, byte col) +{ + byte key; + CursorBlinker cursorBlinker; + CursorBlinker_init(&cursorBlinker, &timer); + for (;;) + { + if (CursorBlinker_updateFromTimer(&cursorBlinker, PAL_POS_CURSOR)) + { + byte prev = setSquarePerimeterColor(row, col, + cursorBlinker.newColorIndex, + !cursorBlinker.isDisplayed); + CursorBlinker_updateAfterChange(&cursorBlinker, prev); + } + key = pollKeyNoLowerCase(); + if (key != 0) + { + // Remove the cursor if it is currently displayed. + if (cursorBlinker.isDisplayed) + setSquarePerimeterColor(row, col, cursorBlinker.origColorIndex, FALSE); + break; + } + } + return key; +} + + +static byte +getGameActionFromUser(void) +{ + for (;;) + { + byte key = waitForKey(); + switch (key) + { + case BREAK_KEY: + return KEY_CONTINUE; + case KEY_PASS: + case KEY_QUIT: + case KEY_HELP: + case KEY_CONTINUE: + case KEY_MONITOR: + return key; + } + } +} + + +static void +playSoundAtNormalSpeed(byte tone, byte duration) +{ + poke(65496, 0); // normal speed + Player_sound(tone, duration); + poke(65497, 0); // high speed +} + + +static void +playErrorSound(void) +{ + playSoundAtNormalSpeed(204, 1); // G4 +} + + +static void +playUserTurnSound(void) +{ + playSoundAtNormalSpeed(50, 1); +} + + +static void showHelp(const GameState *gs); + + +static BOOL +getPositionOnBoardFromUser(const GameState *gs, + byte *inOutRow, + byte *inOutCol, + BOOL mustUseCentralSquare) +{ + assert(*inOutRow < BOARD_SIZE); + assert(*inOutCol < BOARD_SIZE); + + byte row = *inOutRow, col = *inOutCol; + for (;;) + { + byte key = readKeyFromBoardCursor(row, col); + switch (key) + { + case KEY_HELP: + showHelp(gs); + break; + case KEY_UP: + row = (row + (BOARD_SIZE - 1)) % BOARD_SIZE; + break; + case KEY_DOWN: + row = (row + 1) % BOARD_SIZE; + break; + case KEY_LEFT: + col = (col + (BOARD_SIZE - 1)) % BOARD_SIZE; + break; + case KEY_RIGHT: + col = (col + 1) % BOARD_SIZE; + break; + case KEY_ENTER: + if (mustUseCentralSquare + && ( (row != BOARD_SIZE / 2 && col != BOARD_SIZE / 2) + || (row == BOARD_SIZE / 2 && col > BOARD_SIZE / 2) + || (col == BOARD_SIZE / 2 && row > BOARD_SIZE / 2))) + { + playErrorSound(); + writeResult("The first word", "must use", "the central", "square."); + break; + } + assert(row < BOARD_SIZE); + assert(col < BOARD_SIZE); + *inOutRow = row; + *inOutCol = col; + return TRUE; + case '\\': // Shift-Clear prints the seed. Useful for debugging. + printf("%c%c%u\n", + difficultyLevel == LEVEL_EASY ? 'E' : 'H', + userPlaysFirst ? 'U' : 'C', + seed); + break; + case KEY_CANCEL: + return FALSE; + } + } +} + + +// Draws the tiles in prevBoardTile[] in the reverse order in which +// the letters of the entered word were typed in. +// +// *row: One row past the last row occupied by the entered word, +// if across is FALSE, otherwise, the row of that word. +// *col: One column past the last column occupied by the entered word, +// if across is TRUE, otherwise, the column of that word. +// redrawEmptyTiles: The empty tiles in prevBoardTile[] are only redrawn +// if this is TRUE, otherwise they are left as they are. +// +static void +eraseEnteredWord(const GameState *gs, + byte wordLength, BOOL across, byte *row, byte *col, + const byte prevBoardTile[], BOOL redrawEmptyTiles) +{ + assert(wordLength <= MAX_WORD_LEN); + assert(*row <= BOARD_SIZE); + + PositionIterator posIter; + PositionIterator_init(&posIter, across, row, col); + + // Redraw the tiles of the word that were already on the board. + // The other tiles will be overwritten in the right color after the end + // of this function. + for (byte i = wordLength; i--; ) + { + PositionIterator_decrement(&posIter); // decrement *row or *col + assert(*row <= BOARD_SIZE); + byte prevTileType = prevBoardTile[i]; + if (prevTileType != TILE_TYPE_NONE) + { + byte tileTypeToDraw, fore; + if (prevTileType == TILE_TYPE_BLANK) + { + tileTypeToDraw = GameState_getBlankTileLetter(gs, *row, *col); + fore = PAL_BLANK_TILE_FORE; + } + else + { + tileTypeToDraw = prevTileType; + fore = PAL_BOARD_WRITING; + } + drawTileOnBoard(tileTypeToDraw, *row, *col, fore, PAL_TILE_BG); + } + else if (redrawEmptyTiles) + { + byte squareType = GameState_boardSquareTypes[*row][*col]; + drawTileOnBoard(TILE_TYPE_NONE, *row, *col, PAL_BOARD_WRITING, + colorBySquareType[squareType]); + } + } +} + + +static BOOL +usesCentralSquare(const WordSearch *ws, byte wordLength) +{ + const byte row = ws->foundWordRow, col = ws->foundWordCol; + if (ws->foundWordHorizontal) + { + if (row != BOARD_SIZE / 2 + || col > BOARD_SIZE / 2 // start at right of center + || col + wordLength <= BOARD_SIZE / 2) + return FALSE; + } + else + { + if (col != BOARD_SIZE / 2 + || row > BOARD_SIZE / 2 // start below center row + || row + wordLength <= BOARD_SIZE / 2) + return FALSE; + } + return TRUE; +} + + +typedef struct Displacement +{ + signed char dx, dy; +} Displacement; + + +static const Displacement displacements[5] = +{ + { 0, 0 }, + { +1, 0 }, // right + { 0, -1 }, // up + { -1, 0 }, // left + { 0, +1 }, // down +}; + + +// gs: Represents the board without the candidate word. +// +static BOOL +isCandidateWordPosValid(const GameState *gs, + byte wordLength, + BOOL across, + byte row, + byte col) +{ + // Check if one of the letters is adjacent to a letter + // already on the board. + // + PositionIterator posIter; + PositionIterator_init(&posIter, across, &row, &col); + + for (byte i = wordLength; i--; ) + { + // Point (row, col) the next tile of the candidate word, + // from the last tile to the first one. + // + PositionIterator_decrement(&posIter); + + // Try to find a board tile that is at or beside (row, col). + // + for (byte j = 0; j < ARRAY_SIZE(displacements); ++j) + { + const Displacement *d = &displacements[j]; + const byte tileType = GameState_getTileWithBoundsChecking( + gs, row + d->dy, col + d->dx); + if (tileType != TILE_TYPE_NONE) + return TRUE; // found tile at or beside (row, col) + } + } + + // No candidate tile is overlapping or adjacent to an existing tile. + + return FALSE; // reject +} + + +// row, col: In/out. Position PAST the last entered letter in the candidate word. +// +static BOOL +rejectOverlongWord(const GameState *gs, + BOOL across, + byte row, + byte col, + byte wordLength) +{ + //printf("rejectOverlongWord(%u, %u, %u, %u)\n", across, row, col, wordLength); + byte prefixLen, suffixLen, dummy; + if (across) + { + prefixLen = GameState_detectHorizontalPrefix(gs, row, col - wordLength); + suffixLen = GameState_detectHorizontalSuffix(gs, row, col - 1); + } + else // candidate word is vertical: + { + prefixLen = GameState_detectVerticalPrefix(gs, row - wordLength, col); + suffixLen = GameState_detectVerticalSuffix(gs, row - 1, col); + } + byte extendedLen = prefixLen + wordLength + suffixLen; + //printf("rejectOverlongWord: %u + %u + %u = %u\n", + // prefixLen, wordLength, suffixLen, extendedLen); + assert(extendedLen <= BOARD_SIZE); + if (extendedLen > MAX_WORD_LEN) + { + playErrorSound(); + writeResult("This would", "create a word", "of more than", + STRINGIFY_VALUE(MAX_WORD_LEN) " letter(s)."); + return FALSE; + } + return TRUE; +} + + +// User has pressed Enter while entering a word. +// Checks if the word is in the dictionary. +// Also checks adjacent words. +// If the word is rejected, writeResult() is called with an error message +// and FALSE is returned. +// Otherwise workRack[] is copied to ws->rack[], the result field is cleared +// and TRUE is returned. +// row, col: In/out. Position PAST the last entered letter in ws->foundWord[]. +// +static BOOL +handleEnterKey(WordSearch *ws, + BOOL allInRack, + const GameState *gs, + byte wordLength, + byte prevBoardTile[MAX_WORD_LEN + 1], + byte workRack[RACK_SIZE], + BOOL across, + byte *row, + byte *col) +{ + if (allInRack) + { + // Check that word uses central square. + if (!usesCentralSquare(ws, wordLength)) + { + playErrorSound(); + writeResult("The first word", "must use", "the central", "square."); + return FALSE; + } + } + else + { + if (!isCandidateWordPosValid(gs, wordLength, across, *row, *col)) + { + playErrorSound(); + writeResult("Your word must", "overlap a tile", "or be adjacent", "to one."); + return FALSE; + } + } + + writeResult("Checking your", "word...", "", ""); + + assert(wordLength <= MAX_WORD_LEN); + + // Reject the word if it extends an existing word beyond MAX_WORD_LEN. + if (!rejectOverlongWord(gs, across, *row, *col, wordLength)) + return FALSE; + + ws->foundWord[wordLength] = '\0'; + + // Check if the word is in the dictionary. + // Set up a callback that animates the "..." in the text of the last call + // to writeResult(). + // EllipsisAnimation_init() is given the position of that "...". + // + EllipsisAnimation_init(TEXT_WIN_LEFT + 4, TEXT_RESULT_ROW + 1, 7); + dict_setSearchProgressCallback(EllipsisAnimation_update); + + BOOL found = isWordInDictionary(ws->foundWord); + + dict_setSearchProgressCallback(NULL); + + // Reject the word if it is not in the dictionary. + if (!found) + { + playErrorSound(); + writeResult("Not in the", "dictionary.", "", ""); + //printf("ws->foundWord='%s'.\n", ws->foundWord); + return FALSE; + } + + // Reject the word if it extends an existing word in a way that + // is not in the dictionary. + BOOL accepted = GameState_checkAdjacentWords( + gs, ws->foundWordHorizontal, + ws->foundWordRow, ws->foundWordCol, + 255, + ws->foundWord, wordLength); + if (!accepted) + { + playErrorSound(); + writeResult("Your word", "creates an", "illegal", "adjacent word."); + return FALSE; + } + + // Accept the word. Update the player's rack. + eraseEnteredWord(gs, wordLength, across, row, col, prevBoardTile, FALSE); + copyRack(ws->rack, workRack); + ws->foundWordHorizontal = across; + + clearResult(); + + return TRUE; +} + + +static void +handleBackspaceKey(WordSearch *ws, + byte *wordLength, + byte prevBoardTile[MAX_WORD_LEN + 1], + byte workRack[RACK_SIZE], + BOOL across, + byte *row, + byte *col) +{ + if (*wordLength == 0) + return; + --*wordLength; + if (across) + --*col; + else + --*row; + assert(*row < BOARD_SIZE); + + byte prevTileType = prevBoardTile[*wordLength]; + + if (prevTileType == TILE_TYPE_NONE) + { + // Letter being erased came from workRack[]. + byte origKey = ws->foundWord[*wordLength]; + if (ws->letterTileTypeBehindBlank[*wordLength] != TILE_TYPE_NONE) + addToRack(workRack, TILE_TYPE_BLANK); + else + addToRack(workRack, origKey - '@'); + } + + byte squareType = GameState_boardSquareTypes[*row][*col]; + drawTileOnBoard(prevTileType, *row, *col, PAL_BOARD_WRITING, + prevTileType == TILE_TYPE_NONE ? colorBySquareType[squareType] + : PAL_TILE_BG); + showUserRack(workRack); +} + + +// ws->foundWordHorizontal must be set on entry. +// Updates the displayed rack as the user types or backspaces. +// +static BOOL +letUserTypeWord(WordSearch *ws, BOOL allInRack, const GameState *gs) +{ + assert(ws->foundWordRow < BOARD_SIZE); + + byte row = ws->foundWordRow, col = ws->foundWordCol; + byte wordLength = 0; // index into ws->foundWord[] and ws->letterTileTypeBehindBlank[] + byte prevBoardTile[MAX_WORD_LEN + 1]; // tile types + + // Make a copy of the rack so that we can take tiles out of it during the test. + byte workRack[RACK_SIZE]; + copyRack(workRack, ws->rack); + + const BOOL across = ws->foundWordHorizontal; + + CursorBlinker cursorBlinker; + CursorBlinker_init(&cursorBlinker, &timer); + + for (;;) + { + // Animate cursor. + if (CursorBlinker_updateFromTimer(&cursorBlinker, PAL_WORD_ENTRY_CURSOR)) + { + byte prev = setSquarePerimeterColor(row, col, + cursorBlinker.newColorIndex, + !cursorBlinker.isDisplayed); + CursorBlinker_updateAfterChange(&cursorBlinker, prev); + } + + // Read keyboard. + byte key = pollKeyNoLowerCase(); + if (!key) + continue; + + if (key == KEY_HELP) + { + showHelp(gs); + continue; + } + + // Remove the cursor and reinitialize it so that it properly registers + // the underlying color of the next square it will blink on. + if (cursorBlinker.isDisplayed) + setSquarePerimeterColor(row, col, cursorBlinker.origColorIndex, FALSE); + CursorBlinker_init(&cursorBlinker, &timer); + + // Interpret key. + if (key == KEY_CANCEL) + { + eraseEnteredWord(gs, wordLength, across, &row, &col, prevBoardTile, TRUE); + ws->foundWord[0] = '\0'; + showUserRack(ws->rack); + clearResult(); + return FALSE; + } + if (key == KEY_ENTER) + { + if (!handleEnterKey(ws, allInRack, gs, wordLength, prevBoardTile, + workRack, across, &row, &col)) + continue; + // Here, ws->rack[] has been updated. + return TRUE; + } + if (key == KEY_BACKSPACE) + { + // Puts the tile back in workRack[]. + handleBackspaceKey(ws, &wordLength, prevBoardTile, + workRack, across, &row, &col); + continue; + } + if (key < 'A' || key > 'Z' + || wordLength == MAX_WORD_LEN + || row == BOARD_SIZE || col == BOARD_SIZE) + { + if (key) + playErrorSound(); + continue; + } + + byte currentTileType = GameState_getTile(gs, row, col); + + BOOL keyUsesBlank = FALSE; + + // If there is at tile at [row][col], then 'key' must correspond to it. + + if (currentTileType >= 1 && currentTileType <= 26) // if non-blank tile + { + if (key - '@' != currentTileType) + { + playErrorSound(); + continue; + } + } + else if (currentTileType == TILE_TYPE_BLANK) + { + // The board at (row, col) has a blank tile, so this blank tile + // must have been used to represent the same letter as 'key', + // otherwise the key is rejected. + // + if (GameState_getBlankTileLetter(gs, row, col) != key - '@') + { + playErrorSound(); + continue; + } + } + else + { + // No tile at [row][col], so check that 'key' is in rack. + byte rackIndex = rackHasLetter(workRack, (char) key); + if (rackIndex == 255) // if key not in rack + { + // Check if rack has unused blank. + rackIndex = rackHasBlank(workRack); + if (rackIndex == 255) + { + playErrorSound(); + continue; + } + keyUsesBlank = TRUE; + } + workRack[rackIndex] = TILE_TYPE_NONE; // don't use this tile again + showUserRack(workRack); + } + + assert(wordLength < MAX_WORD_LEN); // assert still room for one more char + + ws->foundWord[wordLength] = (char) key; + ws->letterTileTypeBehindBlank[wordLength] = (keyUsesBlank ? key - '@' : TILE_TYPE_NONE); + + // Print the letter. Remember what tile was under it, if any. + prevBoardTile[wordLength] = currentTileType; + drawTileOnBoard(key - '@', row, col, PAL_PROMPTS, PAL_SCREEN_BG); + + ++wordLength; + if (across) + ++col; + else + ++row; + } +} + + +// Returns TRUE if the user wants to continue to the next page, +// or FALSE if the user wants to stop reading. +// +static BOOL +pressSpaceOrBreak(BOOL lastPageShown) +{ + printf("\n" + "Press [Space] "); + if (!lastPageShown) + printf("to continue,\n"); + printf("or [Break] to return to%cthe game.", + !lastPageShown ? ' ' : '\n'); + + byte key; + while ((key = pollKeyboard()) != ' ' && key != BREAK_KEY) + ; + if (!lastPageShown) + clearHardwareTextScreen(); + return key == ' '; +} + + +typedef byte (*GridFuncPtr)(const GameState *gs, byte tileType); + + +static void +printGrid(const GameState *gs, GridFuncPtr gridFuncPtr) +{ + const byte numRows = 6, numCols = 5; + for (byte row = 0; row < numRows; ++row) + { + for (byte col = 0; col < numCols; ++col) + { + byte tileNo = col * numRows + row + 1; + if (tileNo > 26) + putchar('\n'); + else + { + byte points = (*gridFuncPtr)(gs, tileNo); + printf(" %c %2u ", (char) (tileNo + '@'), points); + } + } + } +} + + +// Switches to the 40x24 screen, prints help pages, waits for the user +// to press a key, then switches back to the graphics screen. +// +static void +showHelp(const GameState *gs) +{ + clearHardwareTextScreen(); + asm { sync } // switch screen mode during v-sync: + showHardwareTextScreen(); + + printf("Tile values\n\n"); + printGrid(gs, GameState_getTileValue); + + printf("\n""Tile distribution\n\n"); + printGrid(gs, GameState_getNumTilesOfType); + + printf("\n""There are %u blank tiles.\n", + GameState_getNumTilesOfType(gs, TILE_TYPE_BLANK)); + + if (pressSpaceOrBreak(FALSE)) + { + word totalNumWords; + getDictionaryStats(&totalNumWords); + + printf("This game's dictionary contains %u\n" + "words, each one of " + STRINGIFY_VALUE(MIN_WORD_LEN) " to " + STRINGIFY_VALUE(MAX_WORD_LEN) " letters.\n" + "\n" + "The game forbids entering a word of more" + "than " STRINGIFY_VALUE(MAX_WORD_LEN) + " letters, or a word that would\n" + "create an adjacent word of more than " STRINGIFY_VALUE(MAX_WORD_LEN) "\n" + "letters.\n" + "\n" + "The premium squares have the same effect" + "on scoring than in the traditional game." + "\n" + "The game is over when both players have\n" + "passed twice, all in a row. A player\n" + "passes automatically when that player's\n" + "rack is empty and the bag is also empty.", + totalNumWords); + + (void) pressSpaceOrBreak(TRUE); + } + + asm { sync } // switch screen mode during v-sync: + showGraphicsMode(); +} + + + +enum +{ + USER_PLAYS, + USER_PASSES, + USER_QUITS, +}; + + +enum +{ + USER_PROMPT_SET_START, + USER_PROMPT_SET_DIRECTION, + USER_PROMPT_MENU, +}; + + +// Fills *ws with the word composed by the user. +// allInRack: TRUE if the word must be composed entirely of letters found in rack[]; +// FALSE if the word can use letters that are already on the board. +// ws: Initialized WordSearch object. +// Returns USER_*. +// +static byte +askUserForWord(byte rack[RACK_SIZE], + const GameState *gs, + BOOL allInRack, + WordSearch *ws, + byte initRow, byte initCol) +{ + assert(initRow < BOARD_SIZE); + assert(initCol < BOARD_SIZE); + + ws->foundWordRow = initRow; + ws->foundWordCol = initCol; + + byte state = USER_PROMPT_SET_START; + byte key; + CursorBlinker cursorBlinker; + + for (;;) + { + switch (state) + { + case USER_PROMPT_SET_START: + writeInstructions("Choose where", "to start your", "word with the", + "arrows, then", "press Enter."); + if (!getPositionOnBoardFromUser(gs, + &ws->foundWordRow, + &ws->foundWordCol, + allInRack)) + { + state = USER_PROMPT_MENU; + break; + } + /* FALLTHROUGH */ + + case USER_PROMPT_SET_DIRECTION: + writeInstructions("Across (right", "arrow), down", "(down arrow),", "or go back", "(Break)?"); + CursorBlinker_init(&cursorBlinker, &timer); + do + { + if (CursorBlinker_updateFromTimer(&cursorBlinker, PAL_BOARD_WRITING)) + { + byte prev = setRightAndBottomColor(ws->foundWordRow, ws->foundWordCol, + cursorBlinker.newColorIndex, + !cursorBlinker.isDisplayed); + CursorBlinker_updateAfterChange(&cursorBlinker, prev); + } + + key = pollKeyNoLowerCase(); + + if (key == KEY_HELP) + showHelp(gs); + + } while (key != KEY_RIGHT && key != KEY_DOWN && key != KEY_CANCEL); + + // Remove the cursor if it is currently displayed. + if (cursorBlinker.isDisplayed) + setRightAndBottomColor(ws->foundWordRow, ws->foundWordCol, + cursorBlinker.origColorIndex, FALSE); + + if (key == KEY_CANCEL) + { + state = USER_PROMPT_SET_START; + break; + } + + writeInstructions("Type your word", "then Enter.", + "(Backspace and", "Break can be", "used too.)"); + + ws->foundWordHorizontal = (key == KEY_RIGHT); + + if (!letUserTypeWord(ws, allInRack, gs)) + { + state = USER_PROMPT_SET_DIRECTION; // user cancelled + break; + } + return USER_PLAYS; + + case USER_PROMPT_MENU: // user may want to pass, quit, save or try again + writeInstructions("Pass (P),", + "continue (C),", + "quit (Q),", + "monitor (M) or", + "help (?)?"); + key = getGameActionFromUser(); + switch (key) + { + case KEY_CONTINUE: + state = USER_PROMPT_SET_START; + break; + case KEY_QUIT: + writeInstructions("Really quit?", "Yes (Y) or", "No (N).", "", ""); + while ((key = pollKeyNoLowerCase()) != 'Y' && key != 'N') + ; + if (key == 'N') + { + // Try again. + state = USER_PROMPT_SET_START; + break; + } + return USER_QUITS; + case KEY_PASS: + return USER_PASSES; + case KEY_MONITOR: + alternatePalettes(); + state = USER_PROMPT_SET_START; // automatically continue + break; + case KEY_HELP: + showHelp(gs); + state = USER_PROMPT_SET_START; // automatically continue + break; + } + + } // switch + + } // for + + assert(FALSE); // for() should have done a return +} + + +// Places and draws the word in ws->foundWord[] on the board. +// Places and draws a blank where indicated by ws->letterTileTypeBehindBlank[]. +// +static void +placeWord(const WordSearch *ws, GameState *gs) +{ + byte row, col, rowInc, colInc, wordLen; + const char *wordToPlace; + WordSearch_initWordWalk(ws, &row, &col, &rowInc, &colInc, &wordToPlace, &wordLen); + + for (byte i = 0; i < wordLen; ++i, row += rowInc, col += colInc) + { + byte tile = GameState_getTile(gs, row, col); + if (tile == TILE_TYPE_NONE) // don't overwrite existing tile, which may be a blank + { + // Put the tile on the board. + byte letterTileTypeBehindBlank = ws->letterTileTypeBehindBlank[i]; + tile = (letterTileTypeBehindBlank == TILE_TYPE_NONE ? wordToPlace[i] - '@' : TILE_TYPE_BLANK); + GameState_setTile(gs, row, col, tile, letterTileTypeBehindBlank); + + // Draw the tile on the board. + // If the tile is a blank, draw its letter value in a different color. + byte fore; + byte tileTypeBehindBlankAtPos = GameState_getBlankTileLetter(gs, row, col); + if (tileTypeBehindBlankAtPos != TILE_TYPE_NONE) // if blank at (row, col) + { + tile = tileTypeBehindBlankAtPos; + fore = PAL_BLANK_TILE_FORE; + } + else + fore = PAL_BOARD_WRITING; + + drawTileOnBoard(tile, row, col, fore, PAL_TILE_BG); + } + } +} + + +// Assumes the board's top left corner is at (0, 0). +// +void +drawBoard() +{ + // Draw the squares. + for (byte row = 0; row < BOARD_SIZE; ++row) + { + for (byte col = 0; col < BOARD_SIZE; ++col) + { + byte colorIndex = colorBySquareType[GameState_boardSquareTypes[row][col]]; + draw6ByteWideRectangle(col * 6, row * TILE_HEIGHT, TILE_HEIGHT, colorIndex); + } + } + + // Draw the grid around the squares. + for (byte row = 0; row < BOARD_SIZE + 1; ++row) + hline(0, BOARD_SIZE * TILE_WIDTH, row * TILE_HEIGHT, PAL_BOARD_GRID); + for (byte col = 0; col < BOARD_SIZE + 1; ++col) + vline(0, BOARD_SIZE * TILE_HEIGHT, col * TILE_WIDTH, PAL_BOARD_GRID); + + // Misc. + writeStringAt(TEXT_WIN_LEFT, 0, "Your rack:"); +} + + +// Assumes the board's top left corner is at (0, 0). +// +void +drawTilesOnBoard(GameState *gs) +{ + for (byte row = 0; row < BOARD_SIZE; ++row) + { + for (byte col = 0; col < BOARD_SIZE; ++col) + { + byte tileType = GameState_getTile(gs, row, col); + if (tileType == TILE_TYPE_NONE) + continue; // empty + drawTileOnBoard(tileType, row, col, PAL_BOARD_WRITING, PAL_TILE_BG); + } + } +} + + +#ifndef NDEBUG + + +void +assertHandler(const char *file, int lineno, const char *condition) +{ + printf("!!!%s:%d (%u)\n" /*": %s"*/, file, lineno, seed); + for (byte tone = 255; tone >= 1; tone >>= 1) + Player_sound(tone, 1); + for (;;) + ; +} + + +#endif + + +// Returns TRUE if the user says that the monitor is RGB. +// +static BOOL +showPresentation(void) +{ + //0----+----1----+----2----+----3----+---- + printf("\n" + " " DISPLAY_NAME "\n" + "\n" + "\n" + " Version " VERSION "\n" + "\n" + " Copyright (C) 2026 Pierre Sarrazin\n" + "\n" + " Distribution: GNU GPL v3 or later\n" + "\n" + "\n" + " This is a Scrabble-like board game,\n" + " but only words of 2 to 5 letters are\n" + " allowed.\n" + "\n" + " This game's dictionary may contain\n" + " words that may be offensive to some\n" + " players. Player discretion is advised.\n" + "\n" + " Press the [Break] or [?] key during\n" + " your turn to get help pages.\n" + "\n" + " To start, press [R] now if you have an\n" + " RGB monitor, or [C] for composite.\n"); + //" Press [Space] to continue."); + byte key; + while ((key = pollKeyNoLowerCase()) != 'R' && key != 'C') + ; + return key == 'R'; +} + + +// Assumes that the graphics screen is shown and empty. +// Clears it before returning. +// Fills globals difficultyLevel and userPlaysFirst. +// +static void +askForGameConfig(void) +{ + byte diffLevelKey, firstPlayerKey; + + for (;;) + { + writeStringAt(6, 10, "Difficulty level? (E = easy, H = hard)"); + do + diffLevelKey = waitForKey(); + while (diffLevelKey != 'E' && diffLevelKey != 'H'); + + writeStringAt(3, 14, "Which player starts? (U = user, C = computer)"); + do + firstPlayerKey = waitForKey(); + while (firstPlayerKey != 'U' && firstPlayerKey != 'C' && firstPlayerKey != BREAK_KEY); + + hcls(PAL_SCREEN_BG); + + if (firstPlayerKey != BREAK_KEY) + break; + } + + difficultyLevel = (diffLevelKey == 'E' ? LEVEL_EASY : LEVEL_HARD); + userPlaysFirst = (firstPlayerKey == 'U'); +} + + +// Uses globals difficultyLevel and userPlaysFirst. +// +static void +playGame(void) +{ + drawBoard(); + + GameState gameState; + GameState_init(&gameState); + + // Create the two players and print their initial scores. + // + GamePlayer players[NUM_PLAYERS]; // [0] is computer, [1] is user + for (byte i = 0; i < NUM_PLAYERS; ++i) + { + GamePlayer *player = &players[i]; + BOOL isComputer = (i == 0); + GamePlayer_init(player, isComputer); + + GameState_fillRackEmptySlots(&gameState, player->rack); + if (!isComputer) + showUserRack(player->rack); + + writeScore(player); + } + + byte turn = userPlaysFirst ? 1 : 0; + BOOL firstUserTurn = TRUE; + + byte numNoPlays = 0; // number of consecutives times that players have passed + byte initRow = BOARD_SIZE / 2, initCol = BOARD_SIZE / 2; + + for ( ; ; turn = (turn + 1) % NUM_PLAYERS) + { + writeStringAt(TEXT_WIN_LEFT, TEXT_TURN_ROW, turn ? "Your" : "My"); + writeStringAt(TEXT_WIN_LEFT + (turn ? 4 : 2), TEXT_TURN_ROW, " turn. "); + + GamePlayer *currentPlayer = &players[turn]; + + if (!currentPlayer->isComputer) + { + if (firstUserTurn) + { + writeResult("Press [Break]", "for options,", "[?] for help.", ""); + firstUserTurn = FALSE; + } + playUserTurnSound(); + } + + BOOL allInRack = GameState_isBoardEmpty(&gameState); + + WordSearch wordSearch; + WordSearch_init(&wordSearch, currentPlayer->rack, allInRack, + difficultyLevel, &gameState); + + // If the player's rack is empty, the player passes automatically. + // + BOOL passBecauseEmptyRack = FALSE; + if (GamePlayer_isRackEmpty(currentPlayer)) + { + passBecauseEmptyRack = TRUE; + assert(*wordSearch.foundWord == '\0'); + } + else if (currentPlayer->isComputer) // if non empty rack, computer's turn + { + writeInstructions("Thinking...", "", "", "", ""); + + // Initialize the progress indicator. + // The coordinates must be consistent with the text just written. + // The 8 is the length of "Thinking", i.e., the offset of "..." from + // the start of the written line. + // + EllipsisAnimation_init(TEXT_WIN_LEFT + 8, TEXT_INSTR_ROW, 1); + + const word startTime = timer; // measure time taken by search + + searchPlayableWord(currentPlayer->rack, &gameState, allInRack, &wordSearch); + + while (timer - startTime < 2 * 60) // minimum wait time + ; + } + else // non empty rack, user's turn: + { + byte userAction = askUserForWord(currentPlayer->rack, &gameState, + allInRack, &wordSearch, + initRow, initCol); + clearInstructions(); + if (userAction == USER_QUITS) + break; + if (userAction == USER_PASSES) + *wordSearch.foundWord = '\0'; + else + assert(userAction == USER_PLAYS); + } + + if (*wordSearch.foundWord) // if the player has a word to play + { + word wordValue = WordSearch_countPointsFromWordsPlayed(&wordSearch, &gameState); + currentPlayer->score += wordValue; + + // Print points just scored. + { + char nPoints[TEXT_WIN_WIDTH + 1]; + utoa10(wordValue, nPoints); + strcat(nPoints, " point"); + strcat(nPoints, wordValue == 1 ? "." : "s."); + writeResult(currentPlayer->isComputer ? "I score" : "You score", nPoints, "", ""); + } + + writeScore(currentPlayer); + + // Put the word on the board. + placeWord(&wordSearch, &gameState); + + numNoPlays = 0; + + if (currentPlayer->isComputer) + { + // Put user's cursor at start of computer's last word. + initRow = wordSearch.foundWordRow; + initCol = wordSearch.foundWordCol; + } + else // Update user's rack to remove the tiles just used. + { + showUserRack(currentPlayer->rack); + } + } + else + { + writeResult(currentPlayer->isComputer ? "I pass." : "You pass.", + passBecauseEmptyRack ? "(Empty rack.)" : "", + "", ""); + + // Give user time to see. + waitTicks(2 * 60); + + ++numNoPlays; + if (numNoPlays == NUM_PLAYERS * 2) + break; // no player can play: game over + } + + // Refill the current player's rack before starting the next player's turn, + // so that the user can immediately start thinking of words to be made with + // the refilled rack. + // + GameState_fillRackEmptySlots(&gameState, currentPlayer->rack); + if (!currentPlayer->isComputer) + showUserRack(currentPlayer->rack); + + } // for +} + + +// Main game loop. +// This function does not return. +// +static void +onStackRegisterMoved(void) +{ + // Tell the GIME that the 32x16 screen is at TEXT_SCREEN. + setSAMRegisters((byte *) 0xFFC6, TEXT_SCREEN >> 9, 7); + + clearTextScreen(); + setConsoleOutHook(consoleOutHook32x16); // redirect printf() to 32x16 driver + + #if !defined(NDEBUG) && defined(_ASSERT_IMPL_H) /* If CMOC's was included. */ + _SetFailedAssertHandler(assertHandler); + #endif + + //printf("%s\n", __TIME__); // debugging: print build time + byte driveNo = 0; + //timer = 0; // start timing the load operation + + BOOL success = loadDataFile(driveNo, &textScrnWritePos); + + //word timeToLoadDict = timer; + + poke(0xFF40, 0); // stop disk motor + + if (success) + { + //showDictionary(); + } + else // load failed: freeze on error message + { + printf("[]"); + for (;;) + ; + } + //printf("TIME TO LOAD: %u TICKS\n", timeToLoadDict); + //pause(); + + // Use high-speed poke now that the disk files have been loaded. + poke(65497, 0); + + Keyboard_init(&keyboard); + + setupGraphicsMode(); + + clearHardwareTextScreen(); + asm { sync } // switch screen mode during v-sync: + showHardwareTextScreen(); + + BOOL monitorIsRGB = showPresentation(); + + asm { sync } // switch screen mode during v-sync: + setPalette(monitorIsRGB); + showGraphicsMode(); + + // Set the rand() seed after waiting for the user to pass + // the presentation screen. The timer should now have a + // hard to predict value. + // + #ifdef FIXED_SEED /* for debugging */ + seed = FIXED_SEED; + #else + seed = timer; + #endif + srand(seed); + + for (;;) + { + askForGameConfig(); + + //printf("\n""Seed: %u\n", seed); + + playGame(); + + writePaddingString(TEXT_TURN_ROW, ""); // nobody's turn + + clearResult(); + writeInstructions("Game over.", "", "Press N for", "a new game.", ""); + playSoundAtNormalSpeed(1, 1); + + while (waitForKey() != 'N') + ; + + asm { sync } // clear screen during v-sync + hcls(PAL_SCREEN_BG); + } +} + + +// main() must have no local variables because we move the S register. +// +int +main() +{ + static_assert(GRAPHICS_START < GRAPHICS_END); + + if (* (word *) 0xFFF8 != 0xFEF7) + { + printf("COCO 3 REQUIRED\n"); + return 1; + } + + // Initialize the sector file I/O library. + // + if (!initDiskSystem(drives)) + return 1; + + // Have the decb_*() functions use dskcon() from dskcon.h + // and the DC* variables also in that file. Those variables + // must be in the same order as in Disk Basic. + // + decb_setDskConAddresses(dskcon_processSector, (DECBDskConVariables *) &DCOPC); + + disableInterrupts(); + + // Go to all-RAM mode. + asm("CLR", "$FFDF"); + + // This initializes global pointer Player_instance, which is called by irqISR(). + Player_init(&soundPlayer, FALSE, NULL); + + // Set the IRQ and NMI services. + setISR(IRQ_VECTOR, irqISR); + dskcon_init(dskcon_nmiService); + + // Move the stack register to the new stack space. + asm + { + lds #STACK_BOTTOM + } + + enableInterrupts(); + + // Call a function that does the actual work. + // That function will initialize U to its stack frame, which will sit in + // the new stack space. + // + onStackRegisterMoved(); // never returns + return 0; +} diff --git a/palette.h b/palette.h new file mode 100644 index 0000000..b3a0000 --- /dev/null +++ b/palette.h @@ -0,0 +1,35 @@ +/* palette.h + Copyright (C) 2026 Pierre Sarrazin + + 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 . +*/ + +// Monitor type: RGB CMP +// +PALETTE_ELEMENT(SCREEN_BG, 3, 13) +PALETTE_ELEMENT(BOARD_BG, 56, 32) +PALETTE_ELEMENT(BOARD_GRID, 63, 48) /* lines around the squares */ +PALETTE_ELEMENT(TRIPLE_WORD, 38, 22) +PALETTE_ELEMENT(DOUBLE_WORD, 60, 38) +PALETTE_ELEMENT(TRIPLE_LETTER, 9, 11) +PALETTE_ELEMENT(DOUBLE_LETTER, 59, 60) +PALETTE_ELEMENT(BOARD_WRITING, 0, 0) /* board and tiles */ +PALETTE_ELEMENT(TILE_BG, 62, 53) +PALETTE_ELEMENT(PROMPTS, 54, 35) /* 51x24 writing at right of board */ +PALETTE_ELEMENT(WORD_ENTRY_CURSOR, 17, 17) +PALETTE_ELEMENT(FREE11, 12, 11) /* the free CMP values have not been used or tested */ +PALETTE_ELEMENT(FREE12, 24, 30) +PALETTE_ELEMENT(FREE13, 34, 21) +PALETTE_ELEMENT(FREE14, 47, 56) +PALETTE_ELEMENT(FREE15, 55, 52) diff --git a/word-list.txt b/word-list.txt new file mode 100644 index 0000000..17fb730 --- /dev/null +++ b/word-list.txt @@ -0,0 +1,13597 @@ +AA +AAH +AAHED +AAHS +AAL +AALII +AALS +AARGH +AAS +AB +ABA +ABACA +ABACI +ABACK +ABAFT +ABAKA +ABAMP +ABAS +ABASE +ABASH +ABATE +ABBA +ABBAS +ABBE +ABBES +ABBEY +ABBOT +ABEAM +ABED +ABELE +ABET +ABETS +ABHOR +ABIDE +ABLE +ABLER +ABLES +ABLY +ABMHO +ABO +ABODE +ABOHM +ABOIL +ABOMA +ABOON +ABORT +ABOS +ABOUT +ABOVE +ABRI +ABRIS +ABS +ABUSE +ABUT +ABUTS +ABUZZ +ABY +ABYE +ABYES +ABYS +ABYSM +ABYSS +ACARI +ACE +ACED +ACERB +ACES +ACETA +ACHE +ACHED +ACHES +ACHOO +ACHY +ACID +ACIDS +ACIDY +ACING +ACINI +ACKEE +ACME +ACMES +ACMIC +ACNE +ACNED +ACNES +ACOCK +ACOLD +ACORN +ACRE +ACRED +ACRES +ACRID +ACT +ACTA +ACTED +ACTIN +ACTOR +ACTS +ACUTE +ACYL +ACYLS +AD +ADAGE +ADAPT +ADD +ADDAX +ADDED +ADDER +ADDLE +ADDS +ADEEM +ADEPT +ADIEU +ADIOS +ADIT +ADITS +ADMAN +ADMEN +ADMIT +ADMIX +ADO +ADOBE +ADOBO +ADOPT +ADORE +ADORN +ADOS +ADOWN +ADOZE +ADS +ADULT +ADUNC +ADUST +ADYTA +ADZ +ADZE +ADZES +AE +AECIA +AEDES +AEGIS +AEON +AEONS +AERIE +AERO +AERY +AFAR +AFARS +AFF +AFFIX +AFIRE +AFOOT +AFORE +AFOUL +AFRIT +AFT +AFTER +AG +AGA +AGAIN +AGAMA +AGAPE +AGAR +AGARS +AGAS +AGATE +AGAVE +AGAZE +AGE +AGED +AGEE +AGENE +AGENT +AGER +AGERS +AGES +AGGER +AGGIE +AGGRO +AGHA +AGHAS +AGILE +AGIN +AGING +AGIO +AGIOS +AGISM +AGIST +AGLEE +AGLET +AGLEY +AGLOW +AGLY +AGMA +AGMAS +AGO +AGOG +AGON +AGONE +AGONS +AGONY +AGORA +AGREE +AGRIA +AGUE +AGUES +AH +AHA +AHEAD +AHEM +AHOLD +AHOY +AHULL +AI +AID +AIDE +AIDED +AIDER +AIDES +AIDS +AIL +AILED +AILS +AIM +AIMED +AIMER +AIMS +AIN +AINS +AIOLI +AIR +AIRED +AIRER +AIRN +AIRNS +AIRS +AIRT +AIRTH +AIRTS +AIRY +AIS +AISLE +AIT +AITCH +AITS +AIVER +AJAR +AJEE +AJIVA +AJUGA +AKEE +AKEES +AKELA +AKENE +AKIN +AL +ALA +ALACK +ALAE +ALAMO +ALAN +ALAND +ALANE +ALANG +ALANS +ALANT +ALAR +ALARM +ALARY +ALAS +ALATE +ALB +ALBA +ALBAS +ALBS +ALBUM +ALCID +ALDER +ALDOL +ALE +ALEC +ALECS +ALEE +ALEF +ALEFS +ALEPH +ALERT +ALES +ALFA +ALFAS +ALGA +ALGAE +ALGAL +ALGAS +ALGID +ALGIN +ALGOR +ALGUM +ALIAS +ALIBI +ALIEN +ALIF +ALIFS +ALIGN +ALIKE +ALINE +ALIST +ALIT +ALIVE +ALIYA +ALKY +ALKYD +ALKYL +ALL +ALLAY +ALLEE +ALLEY +ALLOD +ALLOT +ALLOW +ALLOY +ALLS +ALLY +ALLYL +ALMA +ALMAH +ALMAS +ALME +ALMEH +ALMES +ALMS +ALMUD +ALMUG +ALOE +ALOES +ALOFT +ALOHA +ALOIN +ALONE +ALONG +ALOOF +ALOUD +ALOW +ALP +ALPHA +ALPS +ALS +ALSO +ALT +ALTAR +ALTER +ALTHO +ALTO +ALTOS +ALTS +ALULA +ALUM +ALUMS +ALWAY +AM +AMA +AMAH +AMAHS +AMAIN +AMAS +AMASS +AMAZE +AMBER +AMBIT +AMBLE +AMBO +AMBOS +AMBRY +AMEBA +AMEER +AMEN +AMEND +AMENS +AMENT +AMI +AMIA +AMIAS +AMICE +AMICI +AMID +AMIDE +AMIDO +AMIDS +AMIE +AMIES +AMIGA +AMIGO +AMIN +AMINE +AMINO +AMINS +AMIR +AMIRS +AMIS +AMISS +AMITY +AMMO +AMMOS +AMNIA +AMNIC +AMOK +AMOKS +AMOLE +AMONG +AMORT +AMOUR +AMP +AMPLE +AMPLY +AMPS +AMPUL +AMU +AMUCK +AMUS +AMUSE +AMYL +AMYLS +AN +ANA +ANAL +ANAS +ANCON +AND +ANDS +ANE +ANEAR +ANELE +ANENT +ANES +ANEW +ANGA +ANGAS +ANGEL +ANGER +ANGLE +ANGRY +ANGST +ANI +ANIL +ANILE +ANILS +ANIMA +ANIME +ANIMI +ANION +ANIS +ANISE +ANKH +ANKHS +ANKLE +ANKUS +ANLAS +ANNA +ANNAL +ANNAS +ANNEX +ANNOY +ANNUL +ANOA +ANOAS +ANODE +ANOLE +ANOMY +ANON +ANSA +ANSAE +ANT +ANTA +ANTAE +ANTAS +ANTE +ANTED +ANTES +ANTI +ANTIC +ANTIS +ANTRA +ANTRE +ANTS +ANTSY +ANUS +ANVIL +ANY +AORTA +APACE +APART +APE +APEAK +APED +APEEK +APER +APERS +APERY +APES +APEX +APHID +APHIS +APIAN +APING +APISH +APNEA +APOD +APODS +APORT +APPAL +APPEL +APPLE +APPLY +APRES +APRON +APSE +APSES +APSIS +APT +APTER +APTLY +AQUA +AQUAE +AQUAS +AR +ARAK +ARAKS +ARB +ARBOR +ARBS +ARC +ARCED +ARCH +ARCO +ARCS +ARCUS +ARDEB +ARDOR +ARE +AREA +AREAE +AREAL +AREAS +ARECA +AREIC +ARENA +ARES +ARETE +ARF +ARFS +ARGAL +ARGIL +ARGLE +ARGOL +ARGON +ARGOT +ARGUE +ARGUS +ARHAT +ARIA +ARIAS +ARID +ARIEL +ARIL +ARILS +ARISE +ARK +ARKS +ARLES +ARM +ARMED +ARMER +ARMET +ARMOR +ARMS +ARMY +AROID +AROMA +AROSE +ARPEN +ARRAS +ARRAY +ARRIS +ARROW +ARS +ARSE +ARSES +ARSIS +ARSON +ART +ARTAL +ARTEL +ARTS +ARTSY +ARTY +ARUM +ARUMS +ARVAL +ARVO +ARVOS +ARYL +ARYLS +AS +ASANA +ASCI +ASCOT +ASCUS +ASDIC +ASEA +ASH +ASHED +ASHEN +ASHES +ASHY +ASIDE +ASK +ASKED +ASKER +ASKEW +ASKOI +ASKOS +ASKS +ASP +ASPEN +ASPER +ASPIC +ASPIS +ASPS +ASS +ASSAI +ASSAY +ASSES +ASSET +ASTER +ASTIR +ASYLA +AT +ATAP +ATAPS +ATAXY +ATE +ATES +ATILT +ATLAS +ATMA +ATMAN +ATMAS +ATOLL +ATOM +ATOMS +ATOMY +ATONE +ATONY +ATOP +ATOPY +ATRIA +ATRIP +ATT +ATTAR +ATTIC +AUDAD +AUDIO +AUDIT +AUGER +AUGHT +AUGUR +AUK +AUKS +AULD +AULIC +AUNT +AUNTS +AUNTY +AURA +AURAE +AURAL +AURAR +AURAS +AUREI +AURES +AURIC +AURIS +AURUM +AUTO +AUTOS +AUXIN +AVA +AVAIL +AVANT +AVAST +AVE +AVENS +AVER +AVERS +AVERT +AVES +AVGAS +AVIAN +AVID +AVION +AVISO +AVO +AVOID +AVOS +AVOW +AVOWS +AW +AWA +AWAIT +AWAKE +AWARD +AWARE +AWASH +AWAY +AWE +AWED +AWEE +AWES +AWFUL +AWING +AWL +AWLS +AWN +AWNED +AWNS +AWNY +AWOKE +AWOL +AWOLS +AWRY +AX +AXAL +AXE +AXED +AXEL +AXELS +AXES +AXIAL +AXIL +AXILE +AXILS +AXING +AXIOM +AXION +AXIS +AXITE +AXLE +AXLED +AXLES +AXMAN +AXMEN +AXON +AXONE +AXONS +AY +AYAH +AYAHS +AYE +AYES +AYIN +AYINS +AYS +AZAN +AZANS +AZIDE +AZIDO +AZINE +AZLON +AZO +AZOIC +AZOLE +AZON +AZONS +AZOTE +AZOTH +AZURE +BA +BAA +BAAED +BAAL +BAALS +BAAS +BABA +BABAS +BABE +BABEL +BABES +BABKA +BABOO +BABU +BABUL +BABUS +BABY +BACCA +BACH +BACK +BACKS +BACON +BAD +BADDY +BADE +BADGE +BADLY +BADS +BAFF +BAFFS +BAFFY +BAG +BAGEL +BAGGY +BAGS +BAH +BAHT +BAHTS +BAIL +BAILS +BAIRN +BAIT +BAITH +BAITS +BAIZA +BAIZE +BAKE +BAKED +BAKER +BAKES +BAL +BALAS +BALD +BALDS +BALDY +BALE +BALED +BALER +BALES +BALK +BALKS +BALKY +BALL +BALLS +BALLY +BALM +BALMS +BALMY +BALS +BALSA +BAM +BAMS +BAN +BANAL +BANCO +BAND +BANDS +BANDY +BANE +BANED +BANES +BANG +BANGS +BANI +BANJO +BANK +BANKS +BANNS +BANS +BANTY +BAP +BAPS +BAR +BARB +BARBE +BARBS +BARD +BARDE +BARDS +BARE +BARED +BARER +BARES +BARF +BARFS +BARGE +BARIC +BARK +BARKS +BARKY +BARM +BARMS +BARMY +BARN +BARNS +BARNY +BARON +BARRE +BARS +BARYE +BAS +BASAL +BASE +BASED +BASER +BASES +BASH +BASIC +BASIL +BASIN +BASIS +BASK +BASKS +BASS +BASSI +BASSO +BASSY +BAST +BASTE +BASTS +BAT +BATCH +BATE +BATED +BATES +BATH +BATHE +BATHS +BATIK +BATON +BATS +BATT +BATTS +BATTU +BATTY +BAUD +BAUDS +BAULK +BAWD +BAWDS +BAWDY +BAWL +BAWLS +BAWTY +BAY +BAYED +BAYOU +BAYS +BAZAR +BAZOO +BE +BEACH +BEAD +BEADS +BEADY +BEAK +BEAKS +BEAKY +BEAM +BEAMS +BEAMY +BEAN +BEANO +BEANS +BEAR +BEARD +BEARS +BEAST +BEAT +BEATS +BEAU +BEAUS +BEAUT +BEAUX +BEBOP +BECAP +BECK +BECKS +BED +BEDEL +BEDEW +BEDIM +BEDS +BEDU +BEE +BEECH +BEEF +BEEFS +BEEFY +BEEN +BEEP +BEEPS +BEER +BEERS +BEERY +BEES +BEET +BEETS +BEFIT +BEFOG +BEG +BEGAN +BEGAT +BEGET +BEGIN +BEGOT +BEGS +BEGUM +BEGUN +BEIGE +BEIGY +BEING +BEL +BELAY +BELCH +BELGA +BELIE +BELL +BELLE +BELLS +BELLY +BELOW +BELS +BELT +BELTS +BEMA +BEMAS +BEMIX +BEN +BENCH +BEND +BENDS +BENDY +BENE +BENES +BENNE +BENNI +BENNY +BENS +BENT +BENTS +BERET +BERG +BERGS +BERM +BERME +BERMS +BERRY +BERTH +BERYL +BESET +BESOM +BESOT +BEST +BESTS +BET +BETA +BETAS +BETEL +BETH +BETHS +BETON +BETS +BETTA +BEVEL +BEVOR +BEVY +BEWIG +BEY +BEYS +BEZEL +BEZIL +BHANG +BHOOT +BHUT +BHUTS +BI +BIALI +BIALY +BIAS +BIB +BIBB +BIBBS +BIBLE +BIBS +BICE +BICES +BID +BIDDY +BIDE +BIDED +BIDER +BIDES +BIDET +BIDS +BIELD +BIER +BIERS +BIFF +BIFFS +BIFFY +BIFID +BIG +BIGHT +BIGLY +BIGOT +BIGS +BIJOU +BIKE +BIKED +BIKER +BIKES +BIKIE +BILBO +BILE +BILES +BILGE +BILGY +BILK +BILKS +BILL +BILLS +BILLY +BIMA +BIMAH +BIMAS +BIMBO +BIN +BINAL +BIND +BINDI +BINDS +BINE +BINES +BINGE +BINGO +BINIT +BINS +BINT +BINTS +BIO +BIOME +BIONT +BIOS +BIOTA +BIPED +BIPOD +BIRCH +BIRD +BIRDS +BIRK +BIRKS +BIRL +BIRLE +BIRLS +BIRR +BIRRS +BIRSE +BIRTH +BIS +BISE +BISES +BISK +BISKS +BISON +BIT +BITCH +BITE +BITER +BITES +BITS +BITSY +BITT +BITTS +BITTY +BIZ +BIZE +BIZES +BLAB +BLABS +BLACK +BLADE +BLAE +BLAH +BLAHS +BLAIN +BLAM +BLAME +BLAMS +BLAND +BLANK +BLARE +BLASE +BLAST +BLAT +BLATE +BLATS +BLAW +BLAWN +BLAWS +BLAZE +BLEAK +BLEAR +BLEAT +BLEB +BLEBS +BLED +BLEED +BLEEP +BLEND +BLENT +BLESS +BLEST +BLET +BLETS +BLEW +BLIMP +BLIMY +BLIN +BLIND +BLINI +BLINK +BLIP +BLIPS +BLISS +BLITE +BLITZ +BLOAT +BLOB +BLOBS +BLOC +BLOCK +BLOCS +BLOKE +BLOND +BLOOD +BLOOM +BLOOP +BLOT +BLOTS +BLOW +BLOWN +BLOWS +BLOWY +BLUB +BLUBS +BLUE +BLUED +BLUER +BLUES +BLUET +BLUEY +BLUFF +BLUME +BLUNT +BLUR +BLURB +BLURS +BLURT +BLUSH +BLYPE +BO +BOA +BOAR +BOARD +BOARS +BOART +BOAS +BOAST +BOAT +BOATS +BOB +BOBBY +BOBS +BOCCE +BOCCI +BOCHE +BOCK +BOCKS +BOD +BODE +BODED +BODES +BODS +BODY +BOFF +BOFFO +BOFFS +BOG +BOGAN +BOGEY +BOGGY +BOGIE +BOGLE +BOGS +BOGUS +BOGY +BOHEA +BOIL +BOILS +BOING +BOITE +BOLA +BOLAR +BOLAS +BOLD +BOLDS +BOLE +BOLES +BOLL +BOLLS +BOLO +BOLOS +BOLT +BOLTS +BOLUS +BOMB +BOMBE +BOMBS +BOND +BONDS +BONE +BONED +BONER +BONES +BONEY +BONG +BONGO +BONGS +BONK +BONKS +BONNE +BONNY +BONUS +BONY +BONZE +BOO +BOOB +BOOBS +BOOBY +BOOED +BOOGY +BOOK +BOOKS +BOOM +BOOMS +BOOMY +BOON +BOONS +BOOR +BOORS +BOOS +BOOST +BOOT +BOOTH +BOOTS +BOOTY +BOOZE +BOOZY +BOP +BOPS +BORA +BORAL +BORAS +BORAX +BORE +BORED +BORER +BORES +BORIC +BORN +BORNE +BORON +BORT +BORTS +BORTY +BORTZ +BOS +BOSH +BOSK +BOSKS +BOSKY +BOSOM +BOSON +BOSS +BOSSY +BOSUN +BOT +BOTA +BOTAS +BOTCH +BOTEL +BOTH +BOTHY +BOTS +BOTT +BOTTS +BOUGH +BOULE +BOUND +BOURG +BOURN +BOUSE +BOUSY +BOUT +BOUTS +BOVID +BOW +BOWED +BOWEL +BOWER +BOWL +BOWLS +BOWS +BOWSE +BOX +BOXED +BOXER +BOXES +BOXY +BOY +BOYAR +BOYLA +BOYO +BOYOS +BOYS +BOZO +BOZOS +BRA +BRACE +BRACH +BRACT +BRAD +BRADS +BRAE +BRAES +BRAG +BRAGS +BRAID +BRAIL +BRAIN +BRAKE +BRAKY +BRAN +BRAND +BRANK +BRANS +BRANT +BRAS +BRASH +BRASS +BRAT +BRATS +BRAVA +BRAVE +BRAVI +BRAVO +BRAW +BRAWL +BRAWN +BRAWS +BRAXY +BRAY +BRAYS +BRAZA +BRAZE +BREAD +BREAK +BREAM +BRED +BREDE +BREE +BREED +BREES +BREN +BRENS +BRENT +BREVE +BREW +BREWS +BRIAR +BRIBE +BRICK +BRIDE +BRIE +BRIEF +BRIER +BRIES +BRIG +BRIGS +BRILL +BRIM +BRIMS +BRIN +BRINE +BRING +BRINK +BRINS +BRINY +BRIO +BRIOS +BRIS +BRISK +BRIT +BRITS +BRITT +BRO +BROAD +BROCK +BROIL +BROKE +BROME +BROMO +BRONC +BROO +BROOD +BROOK +BROOM +BROOS +BROS +BROSE +BROSY +BROTH +BROW +BROWN +BROWS +BRR +BRRR +BRUGH +BRUIN +BRUIT +BRUME +BRUNT +BRUSH +BRUSK +BRUT +BRUTE +BUB +BUBAL +BUBBY +BUBO +BUBS +BUCK +BUCKO +BUCKS +BUD +BUDDY +BUDGE +BUDS +BUFF +BUFFI +BUFFO +BUFFS +BUFFY +BUG +BUGGY +BUGLE +BUGS +BUHL +BUHLS +BUHR +BUHRS +BUILD +BUILT +BULB +BULBS +BULGE +BULGY +BULK +BULKS +BULKY +BULL +BULLA +BULLS +BULLY +BUM +BUMF +BUMFS +BUMP +BUMPH +BUMPS +BUMPY +BUMS +BUN +BUNCH +BUNCO +BUND +BUNDS +BUNDT +BUNG +BUNGS +BUNK +BUNKO +BUNKS +BUNN +BUNNS +BUNNY +BUNS +BUNT +BUNTS +BUNYA +BUOY +BUOYS +BUR +BURA +BURAN +BURAS +BURBS +BURD +BURDS +BURET +BURG +BURGH +BURGS +BURIN +BURKE +BURL +BURLS +BURLY +BURN +BURNS +BURNT +BURP +BURPS +BURR +BURRO +BURRS +BURRY +BURS +BURSA +BURSE +BURST +BURY +BUS +BUSBY +BUSED +BUSES +BUSH +BUSHY +BUSK +BUSKS +BUSS +BUST +BUSTS +BUSTY +BUSY +BUT +BUTCH +BUTE +BUTEO +BUTLE +BUTS +BUTT +BUTTE +BUTTS +BUTTY +BUTUT +BUTYL +BUXOM +BUY +BUYER +BUYS +BUZZ +BWANA +BY +BYE +BYES +BYLAW +BYRE +BYRES +BYRL +BYRLS +BYS +BYSSI +BYTE +BYTES +BYWAY +CAB +CABAL +CABBY +CABER +CABIN +CABLE +CABOB +CABS +CACA +CACAO +CACAS +CACHE +CACTI +CAD +CADDY +CADE +CADES +CADET +CADGE +CADGY +CADI +CADIS +CADRE +CADS +CAECA +CAFE +CAFES +CAFF +CAFFS +CAGE +CAGED +CAGER +CAGES +CAGEY +CAGY +CAHOW +CAID +CAIDS +CAIN +CAINS +CAIRD +CAIRN +CAJON +CAKE +CAKED +CAKES +CAKEY +CAKY +CALF +CALFS +CALIF +CALIX +CALK +CALKS +CALL +CALLA +CALLS +CALM +CALMS +CALO +CALVE +CALX +CALYX +CAM +CAMAS +CAME +CAMEL +CAMEO +CAMES +CAMP +CAMPI +CAMPO +CAMPS +CAMPY +CAMS +CAN +CANAL +CANDY +CANE +CANED +CANER +CANES +CANID +CANNA +CANNY +CANOE +CANON +CANS +CANSO +CANST +CANT +CANTO +CANTS +CANTY +CAP +CAPE +CAPED +CAPER +CAPES +CAPH +CAPHS +CAPO +CAPON +CAPOS +CAPS +CAPUT +CAR +CARAT +CARB +CARBO +CARBS +CARD +CARDS +CARE +CARED +CARER +CARES +CARET +CAREX +CARGO +CARK +CARKS +CARL +CARLE +CARLS +CARN +CARNS +CARNY +CAROB +CAROL +CAROM +CARP +CARPI +CARPS +CARR +CARRS +CARRY +CARS +CARSE +CART +CARTE +CARTS +CARVE +CASA +CASAS +CASE +CASED +CASES +CASH +CASK +CASKS +CASKY +CAST +CASTE +CASTS +CASUS +CAT +CATCH +CATE +CATER +CATES +CATS +CATTY +CAUL +CAULD +CAULK +CAULS +CAUSE +CAVE +CAVED +CAVER +CAVES +CAVIE +CAVIL +CAVY +CAW +CAWED +CAWS +CAY +CAYS +CEASE +CEBID +CECA +CECAL +CECUM +CEDAR +CEDE +CEDED +CEDER +CEDES +CEDI +CEDIS +CEE +CEES +CEIBA +CEIL +CEILS +CEL +CELEB +CELL +CELLA +CELLI +CELLO +CELLS +CELOM +CELS +CELT +CELTS +CENSE +CENT +CENTO +CENTS +CEORL +CEP +CEPE +CEPES +CEPS +CERCI +CERE +CERED +CERES +CERIA +CERIC +CERO +CEROS +CESS +CESTA +CESTI +CETE +CETES +CHAD +CHADS +CHAFE +CHAFF +CHAIN +CHAIR +CHALK +CHAM +CHAMP +CHAMS +CHANG +CHANT +CHAO +CHAOS +CHAP +CHAPE +CHAPS +CHAPT +CHAR +CHARD +CHARE +CHARK +CHARM +CHARR +CHARS +CHART +CHARY +CHASE +CHASM +CHAT +CHATS +CHAW +CHAWS +CHAY +CHAYS +CHEAP +CHEAT +CHECK +CHEEK +CHEEP +CHEER +CHEF +CHEFS +CHELA +CHEMO +CHERT +CHESS +CHEST +CHETH +CHEVY +CHEW +CHEWS +CHEWY +CHEZ +CHI +CHIA +CHIAO +CHIAS +CHIC +CHICK +CHICO +CHICS +CHID +CHIDE +CHIEF +CHIEL +CHILD +CHILE +CHILI +CHILL +CHIMB +CHIME +CHIMP +CHIN +CHINA +CHINE +CHINK +CHINO +CHINS +CHIP +CHIPS +CHIRK +CHIRM +CHIRO +CHIRP +CHIRR +CHIS +CHIT +CHITS +CHIVE +CHIVY +CHOCK +CHOIR +CHOKE +CHOKY +CHOLO +CHOMP +CHON +CHOOK +CHOP +CHOPS +CHORD +CHORE +CHOSE +CHOTT +CHOW +CHOWS +CHUB +CHUBS +CHUCK +CHUFA +CHUFF +CHUG +CHUGS +CHUM +CHUMP +CHUMS +CHUNK +CHURL +CHURN +CHURR +CHUTE +CHYLE +CHYME +CIAO +CIBOL +CIDER +CIGAR +CILIA +CIMEX +CINCH +CINE +CINES +CION +CIONS +CIRCA +CIRE +CIRES +CIRRI +CIS +CISCO +CISSY +CIST +CISTS +CITE +CITED +CITER +CITES +CITY +CIVET +CIVIC +CIVIE +CIVIL +CIVVY +CLACH +CLACK +CLAD +CLADE +CLADS +CLAG +CLAGS +CLAIM +CLAM +CLAMP +CLAMS +CLAN +CLANG +CLANK +CLANS +CLAP +CLAPS +CLAPT +CLARO +CLARY +CLASH +CLASP +CLASS +CLAST +CLAVE +CLAVI +CLAW +CLAWS +CLAY +CLAYS +CLEAN +CLEAR +CLEAT +CLEEK +CLEF +CLEFS +CLEFT +CLEPE +CLEPT +CLERK +CLEW +CLEWS +CLICK +CLIFF +CLIFT +CLIMB +CLIME +CLINE +CLING +CLINK +CLIP +CLIPS +CLIPT +CLOAK +CLOCK +CLOD +CLODS +CLOG +CLOGS +CLOMB +CLOMP +CLON +CLONE +CLONK +CLONS +CLOOT +CLOP +CLOPS +CLOSE +CLOT +CLOTH +CLOTS +CLOUD +CLOUR +CLOUT +CLOVE +CLOWN +CLOY +CLOYS +CLOZE +CLUB +CLUBS +CLUCK +CLUE +CLUED +CLUES +CLUMP +CLUNG +CLUNK +COACH +COACT +COAL +COALA +COALS +COALY +COAPT +COAST +COAT +COATI +COATS +COAX +COB +COBB +COBBS +COBBY +COBIA +COBLE +COBRA +COBS +COCA +COCAS +COCCI +COCK +COCKS +COCKY +COCO +COCOA +COCOS +COD +CODA +CODAS +CODE +CODEC +CODED +CODEN +CODER +CODES +CODEX +CODON +CODS +COED +COEDS +COFF +COFFS +COFT +COG +COGON +COGS +COHO +COHOG +COHOS +COIF +COIFS +COIGN +COIL +COILS +COIN +COINS +COIR +COIRS +COKE +COKED +COKES +COL +COLA +COLAS +COLD +COLDS +COLE +COLED +COLES +COLIC +COLIN +COLLY +COLOG +COLON +COLOR +COLS +COLT +COLTS +COLY +COLZA +COMA +COMAE +COMAL +COMAS +COMB +COMBE +COMBO +COMBS +COME +COMER +COMES +COMET +COMFY +COMIC +COMIX +COMMA +COMMY +COMP +COMPO +COMPS +COMPT +COMTE +CON +CONCH +CONDO +CONE +CONED +CONES +CONEY +CONGA +CONGE +CONGO +CONI +CONIC +CONIN +CONK +CONKS +CONKY +CONN +CONNS +CONS +CONTE +CONTO +CONUS +CONY +COO +COOCH +COOED +COOEE +COOER +COOEY +COOF +COOFS +COOK +COOKS +COOKY +COOL +COOLS +COOLY +COOMB +COON +COONS +COOP +COOPS +COOPT +COOS +COOT +COOTS +COP +COPAL +COPE +COPED +COPEN +COPER +COPES +COPRA +COPS +COPSE +COPY +COR +CORAL +CORBY +CORD +CORDS +CORE +CORED +CORER +CORES +CORF +CORGI +CORIA +CORK +CORKS +CORKY +CORM +CORMS +CORN +CORNS +CORNU +CORNY +CORPS +CORSE +CORY +COS +COSEC +COSES +COSET +COSEY +COSH +COSIE +COSS +COST +COSTA +COSTS +COSY +COT +COTAN +COTE +COTED +COTES +COTS +COTTA +COUCH +COUDE +COUGH +COULD +COUNT +COUP +COUPE +COUPS +COURT +COUTH +COVE +COVED +COVEN +COVER +COVES +COVET +COVEY +COVIN +COW +COWED +COWER +COWL +COWLS +COWRY +COWS +COWY +COX +COXA +COXAE +COXAL +COXED +COXES +COY +COYED +COYER +COYLY +COYPU +COYS +COZ +COZEN +COZES +COZEY +COZIE +COZY +CRAAL +CRAB +CRABS +CRACK +CRAFT +CRAG +CRAGS +CRAKE +CRAM +CRAMP +CRAMS +CRANE +CRANK +CRAP +CRAPE +CRAPS +CRASH +CRASS +CRATE +CRAVE +CRAW +CRAWL +CRAWS +CRAZE +CRAZY +CREAK +CREAM +CREDO +CREED +CREEK +CREEL +CREEP +CREME +CREPE +CREPT +CREPY +CRESS +CREST +CREW +CREWS +CRIB +CRIBS +CRICK +CRIED +CRIER +CRIES +CRIME +CRIMP +CRIPE +CRIS +CRISP +CROAK +CROC +CROCI +CROCK +CROCS +CROFT +CRONE +CRONY +CROOK +CROON +CROP +CROPS +CRORE +CROSS +CROUP +CROW +CROWD +CROWN +CROWS +CROZE +CRUCK +CRUD +CRUDE +CRUDS +CRUEL +CRUET +CRUMB +CRUMP +CRUOR +CRURA +CRUS +CRUSE +CRUSH +CRUST +CRUX +CRWTH +CRY +CRYPT +CUB +CUBBY +CUBE +CUBEB +CUBED +CUBER +CUBES +CUBIC +CUBIT +CUBS +CUD +CUDDY +CUDS +CUE +CUED +CUES +CUFF +CUFFS +CUIF +CUIFS +CUING +CUISH +CUKE +CUKES +CULCH +CULET +CULEX +CULL +CULLS +CULLY +CULM +CULMS +CULPA +CULT +CULTI +CULTS +CUM +CUMIN +CUP +CUPEL +CUPID +CUPPA +CUPPY +CUPS +CUR +CURB +CURBS +CURCH +CURD +CURDS +CURDY +CURE +CURED +CURER +CURES +CURET +CURF +CURFS +CURIA +CURIE +CURIO +CURL +CURLS +CURLY +CURN +CURNS +CURR +CURRS +CURRY +CURS +CURSE +CURST +CURT +CURVE +CURVY +CUSEC +CUSHY +CUSK +CUSKS +CUSP +CUSPS +CUSS +CUSSO +CUT +CUTCH +CUTE +CUTER +CUTES +CUTEY +CUTIE +CUTIN +CUTIS +CUTS +CUTTY +CUTUP +CWM +CWMS +CYAN +CYANO +CYANS +CYCAD +CYCAS +CYCLE +CYCLO +CYDER +CYLIX +CYMA +CYMAE +CYMAR +CYMAS +CYME +CYMES +CYMOL +CYNIC +CYST +CYSTS +CYTON +CZAR +CZARS +DAB +DABS +DACE +DACES +DACHA +DAD +DADA +DADAS +DADDY +DADO +DADOS +DADS +DAFF +DAFFS +DAFFY +DAFT +DAG +DAGGA +DAGO +DAGOS +DAGS +DAH +DAHL +DAHLS +DAHS +DAILY +DAIRY +DAIS +DAISY +DAK +DAKS +DAL +DALE +DALES +DALLY +DALS +DAM +DAMAN +DAMAR +DAME +DAMES +DAMN +DAMNS +DAMP +DAMPS +DAMS +DANCE +DANDY +DANG +DANGS +DANIO +DANK +DAP +DAPS +DARB +DARBS +DARE +DARED +DARER +DARES +DARIC +DARK +DARKS +DARN +DARNS +DART +DARTS +DASH +DASHI +DASHY +DATA +DATE +DATED +DATER +DATES +DATO +DATOS +DATTO +DATUM +DAUB +DAUBE +DAUBS +DAUBY +DAUNT +DAUT +DAUTS +DAVEN +DAVIT +DAVY +DAW +DAWED +DAWEN +DAWK +DAWKS +DAWN +DAWNS +DAWS +DAWT +DAWTS +DAY +DAYS +DAZE +DAZED +DAZES +DE +DEAD +DEADS +DEAF +DEAIR +DEAL +DEALS +DEALT +DEAN +DEANS +DEAR +DEARS +DEARY +DEASH +DEATH +DEAVE +DEB +DEBAR +DEBIT +DEBS +DEBT +DEBTS +DEBUG +DEBUT +DEBYE +DECAF +DECAL +DECAY +DECK +DECKS +DECO +DECOR +DECOS +DECOY +DECRY +DEDAL +DEE +DEED +DEEDS +DEEDY +DEEM +DEEMS +DEEP +DEEPS +DEER +DEERS +DEES +DEET +DEETS +DEFAT +DEFER +DEFI +DEFIS +DEFOG +DEFT +DEFY +DEGAS +DEGUM +DEICE +DEIFY +DEIGN +DEIL +DEILS +DEISM +DEIST +DEITY +DEKE +DEKED +DEKES +DEKKO +DEL +DELAY +DELE +DELED +DELES +DELF +DELFS +DELFT +DELI +DELIS +DELL +DELLS +DELLY +DELS +DELTA +DELVE +DEME +DEMES +DEMIT +DEMO +DEMOB +DEMON +DEMOS +DEMUR +DEMY +DEN +DENE +DENES +DENIM +DENS +DENSE +DENT +DENTS +DENY +DEOXY +DEPOT +DEPTH +DERAT +DERAY +DERBY +DERE +DERM +DERMA +DERMS +DERRY +DESEX +DESK +DESKS +DETER +DETOX +DEUCE +DEV +DEVA +DEVAS +DEVEL +DEVIL +DEVON +DEVS +DEW +DEWAN +DEWAR +DEWAX +DEWED +DEWS +DEWY +DEX +DEXES +DEXIE +DEXY +DEY +DEYS +DHAK +DHAKS +DHAL +DHALS +DHOBI +DHOLE +DHOTI +DHOW +DHOWS +DHUTI +DIAL +DIALS +DIARY +DIAZO +DIB +DIBS +DICE +DICED +DICER +DICES +DICEY +DICK +DICKS +DICKY +DICOT +DICTA +DICTY +DID +DIDIE +DIDO +DIDOS +DIDST +DIDY +DIE +DIED +DIEL +DIENE +DIES +DIET +DIETS +DIG +DIGHT +DIGIT +DIGS +DIKE +DIKED +DIKER +DIKES +DIKEY +DILDO +DILL +DILLS +DILLY +DIM +DIME +DIMER +DIMES +DIMLY +DIMS +DIN +DINAR +DINE +DINED +DINER +DINES +DING +DINGE +DINGO +DINGS +DINGY +DINK +DINKS +DINKY +DINS +DINT +DINTS +DIODE +DIOL +DIOLS +DIP +DIPPY +DIPS +DIPSO +DIPT +DIRE +DIRER +DIRGE +DIRK +DIRKS +DIRL +DIRLS +DIRT +DIRTS +DIRTY +DIS +DISC +DISCI +DISCO +DISCS +DISH +DISHY +DISK +DISKS +DISME +DISS +DIT +DITA +DITAS +DITCH +DITE +DITES +DITS +DITSY +DITTO +DITTY +DITZ +DITZY +DIVA +DIVAN +DIVAS +DIVE +DIVED +DIVER +DIVES +DIVOT +DIVVY +DIWAN +DIXIT +DIZEN +DIZZY +DJIN +DJINN +DJINS +DO +DOAT +DOATS +DOBBY +DOBIE +DOBLA +DOBRA +DOBY +DOC +DOCK +DOCKS +DOCS +DODGE +DODGY +DODO +DODOS +DOE +DOER +DOERS +DOES +DOEST +DOETH +DOFF +DOFFS +DOG +DOGE +DOGES +DOGEY +DOGGO +DOGGY +DOGIE +DOGMA +DOGS +DOGY +DOILY +DOING +DOIT +DOITS +DOJO +DOJOS +DOL +DOLCE +DOLCI +DOLE +DOLED +DOLES +DOLL +DOLLS +DOLLY +DOLMA +DOLOR +DOLS +DOLT +DOLTS +DOM +DOMAL +DOME +DOMED +DOMES +DOMIC +DOMS +DON +DONA +DONAS +DONE +DONEE +DONG +DONGA +DONGS +DONNA +DONNE +DONOR +DONS +DONSY +DONUT +DOOLY +DOOM +DOOMS +DOOMY +DOOR +DOORS +DOOZY +DOPA +DOPAS +DOPE +DOPED +DOPER +DOPES +DOPEY +DOPY +DOR +DORE +DORK +DORKS +DORKY +DORM +DORMS +DORMY +DORP +DORPS +DORR +DORRS +DORS +DORSA +DORTY +DORY +DOS +DOSE +DOSED +DOSER +DOSES +DOSS +DOST +DOT +DOTAL +DOTE +DOTED +DOTER +DOTES +DOTH +DOTS +DOTTY +DOTY +DOUBT +DOUCE +DOUGH +DOUM +DOUMA +DOUMS +DOUR +DOURA +DOUSE +DOUX +DOVE +DOVEN +DOVES +DOW +DOWDY +DOWED +DOWEL +DOWER +DOWIE +DOWN +DOWNS +DOWNY +DOWRY +DOWS +DOWSE +DOXIE +DOXY +DOYEN +DOYLY +DOZE +DOZED +DOZEN +DOZER +DOZES +DOZY +DRAB +DRABS +DRAFF +DRAFT +DRAG +DRAGS +DRAIL +DRAIN +DRAKE +DRAM +DRAMA +DRAMS +DRANK +DRAPE +DRAT +DRATS +DRAVE +DRAW +DRAWL +DRAWN +DRAWS +DRAY +DRAYS +DREAD +DREAM +DREAR +DRECK +DREE +DREED +DREES +DREG +DREGS +DREK +DREKS +DRESS +DREST +DREW +DRIB +DRIBS +DRIED +DRIER +DRIES +DRIFT +DRILL +DRILY +DRINK +DRIP +DRIPS +DRIPT +DRIVE +DROIT +DROLL +DRONE +DROOL +DROOP +DROP +DROPS +DROPT +DROSS +DROUK +DROVE +DROWN +DRUB +DRUBS +DRUG +DRUGS +DRUID +DRUM +DRUMS +DRUNK +DRUPE +DRUSE +DRY +DRYAD +DRYER +DRYLY +DRYS +DUAD +DUADS +DUAL +DUALS +DUB +DUBS +DUCAL +DUCAT +DUCE +DUCES +DUCHY +DUCI +DUCK +DUCKS +DUCKY +DUCT +DUCTS +DUD +DUDDY +DUDE +DUDED +DUDES +DUDS +DUE +DUEL +DUELS +DUES +DUET +DUETS +DUFF +DUFFS +DUG +DUGS +DUI +DUIT +DUITS +DUKE +DUKED +DUKES +DULIA +DULL +DULLS +DULLY +DULSE +DULY +DUMA +DUMAS +DUMB +DUMBS +DUMKA +DUMKY +DUMMY +DUMP +DUMPS +DUMPY +DUN +DUNAM +DUNCE +DUNCH +DUNE +DUNES +DUNG +DUNGS +DUNGY +DUNK +DUNKS +DUNS +DUNT +DUNTS +DUO +DUOMI +DUOMO +DUOS +DUP +DUPE +DUPED +DUPER +DUPES +DUPLE +DUPS +DURA +DURAL +DURAS +DURE +DURED +DURES +DURN +DURNS +DURO +DUROC +DUROS +DURR +DURRA +DURRS +DURST +DURUM +DUSK +DUSKS +DUSKY +DUST +DUSTS +DUSTY +DUTCH +DUTY +DUVET +DWARF +DWEEB +DWELL +DWELT +DWINE +DYAD +DYADS +DYE +DYED +DYER +DYERS +DYES +DYING +DYKE +DYKED +DYKES +DYNE +DYNEL +DYNES +EACH +EAGER +EAGLE +EAGRE +EAR +EARED +EARL +EARLS +EARLY +EARN +EARNS +EARS +EARTH +EASE +EASED +EASEL +EASES +EAST +EASTS +EASY +EAT +EATEN +EATER +EATH +EATS +EAU +EAUX +EAVE +EAVED +EAVES +EBB +EBBED +EBBET +EBBS +EBON +EBONS +EBONY +ECHE +ECHED +ECHES +ECHO +ECHOS +ECLAT +ECRU +ECRUS +ECU +ECUS +ED +EDDO +EDDY +EDEMA +EDGE +EDGED +EDGER +EDGES +EDGY +EDH +EDHS +EDICT +EDIFY +EDILE +EDIT +EDITS +EDUCE +EDUCT +EEL +EELS +EELY +EERIE +EERY +EF +EFF +EFFS +EFS +EFT +EFTS +EGAD +EGADS +EGAL +EGER +EGERS +EGEST +EGG +EGGAR +EGGED +EGGER +EGGS +EGGY +EGIS +EGO +EGOS +EGRET +EH +EIDE +EIDER +EIDOS +EIGHT +EIKON +EJECT +EKE +EKED +EKES +EKING +EL +ELAIN +ELAN +ELAND +ELANS +ELATE +ELBOW +ELD +ELDER +ELDS +ELECT +ELEGY +ELEMI +ELF +ELFIN +ELHI +ELIDE +ELINT +ELITE +ELK +ELKS +ELL +ELLS +ELM +ELMS +ELMY +ELOIN +ELOPE +ELS +ELSE +ELUDE +ELUTE +ELVER +ELVES +EM +EMBAR +EMBAY +EMBED +EMBER +EMBOW +EMCEE +EME +EMEER +EMEND +EMERY +EMES +EMEU +EMEUS +EMF +EMFS +EMIC +EMIR +EMIRS +EMIT +EMITS +EMMER +EMMET +EMOTE +EMPTY +EMS +EMU +EMUS +EMYD +EMYDE +EMYDS +EN +ENACT +ENATE +END +ENDED +ENDER +ENDOW +ENDS +ENDUE +ENEMA +ENEMY +ENG +ENGS +ENJOY +ENNUI +ENOKI +ENOL +ENOLS +ENORM +ENOW +ENOWS +ENROL +ENS +ENSKY +ENSUE +ENTER +ENTIA +ENTRY +ENURE +ENVOI +ENVOY +ENVY +ENZYM +EON +EONS +EOSIN +EPACT +EPEE +EPEES +EPHA +EPHAH +EPHAS +EPHOD +EPHOR +EPIC +EPICS +EPOCH +EPODE +EPOS +EPOXY +EQUAL +EQUID +EQUIP +ER +ERA +ERAS +ERASE +ERE +ERECT +ERG +ERGO +ERGOT +ERGS +ERICA +ERN +ERNE +ERNES +ERNS +ERODE +EROS +EROSE +ERR +ERRED +ERROR +ERRS +ERS +ERSES +ERST +ERUCT +ERUGO +ERUPT +ERVIL +ES +ESCAR +ESCOT +ESES +ESKAR +ESKER +ESPY +ESS +ESSAY +ESSES +ESTER +ESTOP +ET +ETA +ETAPE +ETAS +ETCH +ETH +ETHER +ETHIC +ETHOS +ETHS +ETHYL +ETIC +ETNA +ETNAS +ETUDE +ETUI +ETUIS +ETWEE +ETYMA +EURO +EUROS +EVADE +EVE +EVEN +EVENS +EVENT +EVER +EVERT +EVERY +EVES +EVICT +EVIL +EVILS +EVITE +EVOKE +EWE +EWER +EWERS +EWES +EX +EXACT +EXALT +EXAM +EXAMS +EXCEL +EXEC +EXECS +EXERT +EXES +EXILE +EXINE +EXIST +EXIT +EXITS +EXON +EXONS +EXPAT +EXPEL +EXPO +EXPOS +EXTOL +EXTRA +EXUDE +EXULT +EXURB +EYAS +EYE +EYED +EYEN +EYER +EYERS +EYES +EYING +EYNE +EYRA +EYRAS +EYRE +EYRES +EYRIE +EYRIR +EYRY +FA +FABLE +FACE +FACED +FACER +FACES +FACET +FACIA +FACT +FACTS +FAD +FADDY +FADE +FADED +FADER +FADES +FADGE +FADO +FADOS +FADS +FAENA +FAERY +FAG +FAGIN +FAGOT +FAGS +FAIL +FAILS +FAIN +FAINT +FAIR +FAIRS +FAIRY +FAITH +FAKE +FAKED +FAKER +FAKES +FAKEY +FAKIR +FALL +FALLS +FALSE +FALX +FAME +FAMED +FAMES +FAN +FANCY +FANE +FANES +FANG +FANGA +FANGS +FANNY +FANO +FANON +FANOS +FANS +FANUM +FAQIR +FAR +FARAD +FARCE +FARCI +FARCY +FARD +FARDS +FARE +FARED +FARER +FARES +FARL +FARLE +FARLS +FARM +FARMS +FARO +FAROS +FART +FARTS +FAS +FASH +FAST +FASTS +FAT +FATAL +FATE +FATED +FATES +FATLY +FATS +FATSO +FATTY +FATWA +FAUGH +FAULD +FAULT +FAUN +FAUNA +FAUNS +FAUVE +FAUX +FAVA +FAVAS +FAVE +FAVES +FAVOR +FAVUS +FAWN +FAWNS +FAWNY +FAX +FAXED +FAXES +FAY +FAYED +FAYS +FAZE +FAZED +FAZES +FEAL +FEAR +FEARS +FEASE +FEAST +FEAT +FEATS +FEAZE +FECAL +FECES +FECK +FECKS +FED +FEDS +FEE +FEED +FEEDS +FEEL +FEELS +FEES +FEET +FEEZE +FEH +FEHS +FEIGN +FEINT +FEIST +FELID +FELL +FELLA +FELLS +FELLY +FELON +FELT +FELTS +FEM +FEME +FEMES +FEMME +FEMS +FEMUR +FEN +FENCE +FEND +FENDS +FENNY +FENS +FEOD +FEODS +FEOFF +FER +FERAL +FERE +FERES +FERIA +FERLY +FERMI +FERN +FERNS +FERNY +FERRY +FESS +FESSE +FET +FETA +FETAL +FETAS +FETCH +FETE +FETED +FETES +FETID +FETOR +FETS +FETUS +FEU +FEUAR +FEUD +FEUDS +FEUED +FEUS +FEVER +FEW +FEWER +FEY +FEYER +FEYLY +FEZ +FEZES +FIAR +FIARS +FIAT +FIATS +FIB +FIBER +FIBRE +FIBS +FICE +FICES +FICHE +FICHU +FICIN +FICO +FICUS +FID +FIDGE +FIDO +FIDOS +FIDS +FIE +FIEF +FIEFS +FIELD +FIEND +FIERY +FIFE +FIFED +FIFER +FIFES +FIFTH +FIFTY +FIG +FIGHT +FIGS +FIL +FILA +FILAR +FILCH +FILE +FILED +FILER +FILES +FILET +FILL +FILLE +FILLO +FILLS +FILLY +FILM +FILMS +FILMY +FILO +FILOS +FILS +FILTH +FILUM +FIN +FINAL +FINCH +FIND +FINDS +FINE +FINED +FINER +FINES +FINIS +FINK +FINKS +FINNY +FINO +FINOS +FINS +FIORD +FIQUE +FIR +FIRE +FIRED +FIRER +FIRES +FIRM +FIRMS +FIRN +FIRNS +FIRRY +FIRS +FIRST +FIRTH +FISC +FISCS +FISH +FISHY +FIST +FISTS +FIT +FITCH +FITLY +FITS +FIVE +FIVER +FIVES +FIX +FIXED +FIXER +FIXES +FIXIT +FIXT +FIZ +FIZZ +FIZZY +FJELD +FJORD +FLAB +FLABS +FLACK +FLAG +FLAGS +FLAIL +FLAIR +FLAK +FLAKE +FLAKY +FLAM +FLAME +FLAMS +FLAMY +FLAN +FLANK +FLANS +FLAP +FLAPS +FLARE +FLASH +FLASK +FLAT +FLATS +FLAW +FLAWS +FLAWY +FLAX +FLAXY +FLAY +FLAYS +FLEA +FLEAM +FLEAS +FLECK +FLED +FLEE +FLEER +FLEES +FLEET +FLESH +FLEW +FLEWS +FLEX +FLEY +FLEYS +FLIC +FLICK +FLICS +FLIED +FLIER +FLIES +FLING +FLINT +FLIP +FLIPS +FLIRT +FLIT +FLITE +FLITS +FLOAT +FLOC +FLOCK +FLOCS +FLOE +FLOES +FLOG +FLOGS +FLONG +FLOOD +FLOOR +FLOP +FLOPS +FLORA +FLOSS +FLOTA +FLOUR +FLOUT +FLOW +FLOWN +FLOWS +FLU +FLUB +FLUBS +FLUE +FLUED +FLUES +FLUFF +FLUID +FLUKE +FLUKY +FLUME +FLUMP +FLUNG +FLUNK +FLUOR +FLUS +FLUSH +FLUTE +FLUTY +FLUX +FLUYT +FLY +FLYBY +FLYER +FLYTE +FOAL +FOALS +FOAM +FOAMS +FOAMY +FOB +FOBS +FOCAL +FOCI +FOCUS +FOE +FOEHN +FOES +FOG +FOGEY +FOGGY +FOGIE +FOGS +FOGY +FOH +FOHN +FOHNS +FOIL +FOILS +FOIN +FOINS +FOIST +FOLD +FOLDS +FOLIA +FOLIO +FOLK +FOLKS +FOLKY +FOLLY +FON +FOND +FONDS +FONDU +FONS +FONT +FONTS +FOOD +FOODS +FOOL +FOOLS +FOOT +FOOTS +FOOTY +FOP +FOPS +FOR +FORA +FORAM +FORAY +FORB +FORBS +FORBY +FORCE +FORD +FORDO +FORDS +FORE +FORES +FORGE +FORGO +FORK +FORKS +FORKY +FORM +FORME +FORMS +FORT +FORTE +FORTH +FORTS +FORTY +FORUM +FOSS +FOSSA +FOSSE +FOU +FOUL +FOULS +FOUND +FOUNT +FOUR +FOURS +FOVEA +FOWL +FOWLS +FOX +FOXED +FOXES +FOXY +FOY +FOYER +FOYS +FOZY +FRAE +FRAG +FRAGS +FRAIL +FRAME +FRANC +FRANK +FRAP +FRAPS +FRASS +FRAT +FRATS +FRAUD +FRAY +FRAYS +FREAK +FREE +FREED +FREER +FREES +FREMD +FRENA +FRERE +FRESH +FRET +FRETS +FRIAR +FRIED +FRIER +FRIES +FRIG +FRIGS +FRILL +FRISE +FRISK +FRIT +FRITH +FRITS +FRITT +FRITZ +FRIZ +FRIZZ +FRO +FROCK +FROE +FROES +FROG +FROGS +FROM +FROND +FRONS +FRONT +FRORE +FROSH +FROST +FROTH +FROW +FROWN +FROWS +FROZE +FRUG +FRUGS +FRUIT +FRUMP +FRY +FRYER +FUB +FUBS +FUBSY +FUCI +FUCUS +FUD +FUDGE +FUDS +FUEL +FUELS +FUG +FUGAL +FUGGY +FUGIO +FUGLE +FUGS +FUGU +FUGUE +FUGUS +FUJI +FUJIS +FULL +FULLS +FULLY +FUME +FUMED +FUMER +FUMES +FUMET +FUMY +FUN +FUND +FUNDI +FUNDS +FUNGI +FUNGO +FUNK +FUNKS +FUNKY +FUNNY +FUNS +FUR +FURAN +FURL +FURLS +FUROR +FURRY +FURS +FURY +FURZE +FURZY +FUSE +FUSED +FUSEE +FUSEL +FUSES +FUSIL +FUSS +FUSSY +FUSTY +FUTON +FUTZ +FUZE +FUZED +FUZEE +FUZES +FUZIL +FUZZ +FUZZY +FYCE +FYCES +FYKE +FYKES +FYTTE +GAB +GABBY +GABLE +GABS +GABY +GAD +GADDI +GADI +GADID +GADIS +GADS +GAE +GAED +GAEN +GAES +GAFF +GAFFE +GAFFS +GAG +GAGA +GAGE +GAGED +GAGER +GAGES +GAGS +GAILY +GAIN +GAINS +GAIT +GAITS +GAL +GALA +GALAH +GALAS +GALAX +GALE +GALEA +GALES +GALL +GALLS +GALLY +GALOP +GALS +GAM +GAMA +GAMAS +GAMAY +GAMB +GAMBA +GAMBE +GAMBS +GAME +GAMED +GAMER +GAMES +GAMEY +GAMIC +GAMIN +GAMMA +GAMMY +GAMP +GAMPS +GAMS +GAMUT +GAMY +GAN +GANE +GANEF +GANEV +GANG +GANGS +GANJA +GANOF +GAOL +GAOLS +GAP +GAPE +GAPED +GAPER +GAPES +GAPPY +GAPS +GAPY +GAR +GARB +GARBS +GARNI +GARS +GARTH +GAS +GASES +GASH +GASP +GASPS +GASSY +GAST +GASTS +GAT +GATE +GATED +GATES +GATOR +GATS +GAUD +GAUDS +GAUDY +GAUGE +GAULT +GAUM +GAUMS +GAUN +GAUNT +GAUR +GAURS +GAUSS +GAUZE +GAUZY +GAVE +GAVEL +GAVOT +GAWK +GAWKS +GAWKY +GAWP +GAWPS +GAWSY +GAY +GAYAL +GAYER +GAYLY +GAYS +GAZAR +GAZE +GAZED +GAZER +GAZES +GEAR +GEARS +GECK +GECKO +GECKS +GED +GEDS +GEE +GEED +GEEK +GEEKS +GEEKY +GEES +GEESE +GEEST +GEEZ +GEL +GELD +GELDS +GELEE +GELID +GELS +GELT +GELTS +GEM +GEMMA +GEMMY +GEMOT +GEMS +GEN +GENE +GENES +GENET +GENIC +GENIE +GENII +GENIP +GENOA +GENOM +GENRE +GENRO +GENS +GENT +GENTS +GENU +GENUA +GENUS +GEODE +GEOID +GERAH +GERM +GERMS +GERMY +GESSO +GEST +GESTE +GESTS +GET +GETA +GETAS +GETS +GETUP +GEUM +GEUMS +GEY +GHAST +GHAT +GHATS +GHAUT +GHAZI +GHEE +GHEES +GHI +GHIS +GHOST +GHOUL +GHYLL +GIANT +GIB +GIBE +GIBED +GIBER +GIBES +GIBS +GID +GIDDY +GIDS +GIE +GIED +GIEN +GIES +GIFT +GIFTS +GIG +GIGA +GIGAS +GIGHE +GIGOT +GIGS +GIGUE +GILD +GILDS +GILL +GILLS +GILLY +GILT +GILTS +GIMEL +GIMME +GIMP +GIMPS +GIMPY +GIN +GINK +GINKS +GINNY +GINS +GIP +GIPON +GIPS +GIPSY +GIRD +GIRDS +GIRL +GIRLS +GIRLY +GIRN +GIRNS +GIRO +GIRON +GIROS +GIRSH +GIRT +GIRTH +GIRTS +GISMO +GIST +GISTS +GIT +GITS +GIVE +GIVEN +GIVER +GIVES +GIZMO +GLACE +GLAD +GLADE +GLADS +GLADY +GLAIR +GLAND +GLANS +GLARE +GLARY +GLASS +GLAZE +GLAZY +GLEAM +GLEAN +GLEBA +GLEBE +GLED +GLEDE +GLEDS +GLEE +GLEED +GLEEK +GLEES +GLEET +GLEG +GLEN +GLENS +GLEY +GLEYS +GLIA +GLIAL +GLIAS +GLIB +GLIDE +GLIFF +GLIM +GLIME +GLIMS +GLINT +GLITZ +GLOAM +GLOAT +GLOB +GLOBE +GLOBS +GLOGG +GLOM +GLOMS +GLOOM +GLOP +GLOPS +GLORY +GLOSS +GLOST +GLOUT +GLOVE +GLOW +GLOWS +GLOZE +GLUE +GLUED +GLUER +GLUES +GLUEY +GLUG +GLUGS +GLUM +GLUME +GLUON +GLUT +GLUTS +GLYPH +GNAR +GNARL +GNARR +GNARS +GNASH +GNAT +GNATS +GNAW +GNAWN +GNAWS +GNOME +GNU +GNUS +GO +GOA +GOAD +GOADS +GOAL +GOALS +GOAS +GOAT +GOATS +GOB +GOBAN +GOBO +GOBOS +GOBS +GOBY +GOD +GODET +GODLY +GODS +GOER +GOERS +GOES +GOFER +GOGO +GOGOS +GOING +GOLD +GOLDS +GOLEM +GOLF +GOLFS +GOLLY +GOMBO +GONAD +GONE +GONEF +GONER +GONG +GONGS +GONIA +GONIF +GONOF +GONZO +GOO +GOOD +GOODS +GOODY +GOOEY +GOOF +GOOFS +GOOFY +GOOKY +GOON +GOONS +GOONY +GOOP +GOOPS +GOOPY +GOOS +GOOSE +GOOSY +GOR +GORAL +GORE +GORED +GORES +GORGE +GORP +GORPS +GORSE +GORSY +GORY +GOSH +GOT +GOUGE +GOURD +GOUT +GOUTS +GOUTY +GOWAN +GOWD +GOWDS +GOWK +GOWKS +GOWN +GOWNS +GOX +GOXES +GOY +GOYIM +GOYS +GRAAL +GRAB +GRABS +GRACE +GRAD +GRADE +GRADS +GRAFT +GRAIL +GRAIN +GRAM +GRAMA +GRAMP +GRAMS +GRAN +GRANA +GRAND +GRANS +GRANT +GRAPE +GRAPH +GRAPY +GRASP +GRASS +GRAT +GRATE +GRAVE +GRAVY +GRAY +GRAYS +GRAZE +GREAT +GREBE +GREE +GREED +GREEK +GREEN +GREES +GREET +GREGO +GREW +GREY +GREYS +GRID +GRIDE +GRIDS +GRIEF +GRIFF +GRIFT +GRIG +GRIGS +GRILL +GRIM +GRIME +GRIMY +GRIN +GRIND +GRINS +GRIOT +GRIP +GRIPE +GRIPS +GRIPT +GRIPY +GRIST +GRIT +GRITH +GRITS +GROAN +GROAT +GROG +GROGS +GROIN +GROOM +GROPE +GROSS +GROSZ +GROT +GROTS +GROUP +GROUT +GROVE +GROW +GROWL +GROWN +GROWS +GRUB +GRUBS +GRUE +GRUEL +GRUES +GRUFF +GRUM +GRUME +GRUMP +GRUNT +GUACO +GUAN +GUANO +GUANS +GUAR +GUARD +GUARS +GUAVA +GUCK +GUCKS +GUDE +GUDES +GUESS +GUEST +GUFF +GUFFS +GUID +GUIDE +GUIDS +GUILD +GUILE +GUILT +GUIRO +GUISE +GUL +GULAG +GULAR +GULCH +GULES +GULF +GULFS +GULFY +GULL +GULLS +GULLY +GULP +GULPS +GULPY +GULS +GUM +GUMBO +GUMMA +GUMMY +GUMS +GUN +GUNK +GUNKS +GUNKY +GUNNY +GUNS +GUPPY +GURGE +GURRY +GURSH +GURU +GURUS +GUSH +GUSHY +GUSSY +GUST +GUSTO +GUSTS +GUSTY +GUT +GUTS +GUTSY +GUTTA +GUTTY +GUV +GUVS +GUY +GUYED +GUYOT +GUYS +GYBE +GYBED +GYBES +GYM +GYMS +GYP +GYPS +GYPSY +GYRAL +GYRE +GYRED +GYRES +GYRI +GYRO +GYRON +GYROS +GYRUS +GYVE +GYVED +GYVES +HA +HAAF +HAAFS +HAAR +HAARS +HABIT +HABU +HABUS +HACEK +HACK +HACKS +HAD +HADAL +HADE +HADED +HADES +HADJ +HADJI +HADST +HAE +HAED +HAEM +HAEMS +HAEN +HAES +HAET +HAETS +HAFIS +HAFIZ +HAFT +HAFTS +HAG +HAGS +HAH +HAHA +HAHAS +HAHS +HAIK +HAIKA +HAIKS +HAIKU +HAIL +HAILS +HAIR +HAIRS +HAIRY +HAJ +HAJES +HAJI +HAJIS +HAJJ +HAJJI +HAKE +HAKES +HAKIM +HALE +HALED +HALER +HALES +HALF +HALID +HALL +HALLO +HALLS +HALM +HALMA +HALMS +HALO +HALOS +HALT +HALTS +HALVA +HALVE +HAM +HAMAL +HAME +HAMES +HAMMY +HAMS +HAMZA +HANCE +HAND +HANDS +HANDY +HANG +HANGS +HANK +HANKS +HANKY +HANSA +HANSE +HANT +HANTS +HAO +HAOLE +HAP +HAPAX +HAPLY +HAPPY +HAPS +HARD +HARDS +HARDY +HARE +HARED +HAREM +HARES +HARK +HARKS +HARL +HARLS +HARM +HARMS +HARP +HARPS +HARPY +HARRY +HARSH +HART +HARTS +HAS +HASH +HASP +HASPS +HAST +HASTE +HASTY +HAT +HATCH +HATE +HATED +HATER +HATES +HATH +HATS +HAUGH +HAUL +HAULM +HAULS +HAUNT +HAUT +HAUTE +HAVE +HAVEN +HAVER +HAVES +HAVOC +HAW +HAWED +HAWK +HAWKS +HAWS +HAWSE +HAY +HAYED +HAYER +HAYS +HAZAN +HAZE +HAZED +HAZEL +HAZER +HAZES +HAZY +HE +HEAD +HEADS +HEADY +HEAL +HEALS +HEAP +HEAPS +HEAR +HEARD +HEARS +HEART +HEAT +HEATH +HEATS +HEAVE +HEAVY +HEBE +HEBES +HECK +HECKS +HEDER +HEDGE +HEDGY +HEED +HEEDS +HEEL +HEELS +HEEZE +HEFT +HEFTS +HEFTY +HEH +HEHS +HEIGH +HEIL +HEILS +HEIR +HEIRS +HEIST +HELD +HELIO +HELIX +HELL +HELLO +HELLS +HELM +HELMS +HELO +HELOS +HELOT +HELP +HELPS +HELVE +HEM +HEMAL +HEME +HEMES +HEMIC +HEMIN +HEMP +HEMPS +HEMPY +HEMS +HEN +HENCE +HENNA +HENRY +HENS +HENT +HENTS +HEP +HER +HERB +HERBS +HERBY +HERD +HERDS +HERE +HERES +HERL +HERLS +HERM +HERMA +HERMS +HERN +HERNS +HERO +HERON +HEROS +HERRY +HERS +HERTZ +HES +HEST +HESTS +HET +HETH +HETHS +HETS +HEUCH +HEUGH +HEW +HEWED +HEWER +HEWN +HEWS +HEX +HEXAD +HEXED +HEXER +HEXES +HEXYL +HEY +HI +HIC +HICK +HICKS +HID +HIDE +HIDED +HIDER +HIDES +HIE +HIED +HIES +HIGH +HIGHS +HIGHT +HIKE +HIKED +HIKER +HIKES +HILA +HILAR +HILI +HILL +HILLO +HILLS +HILLY +HILT +HILTS +HILUM +HILUS +HIM +HIN +HIND +HINDS +HINGE +HINNY +HINS +HINT +HINTS +HIP +HIPPO +HIPPY +HIPS +HIRE +HIRED +HIRER +HIRES +HIS +HISN +HISS +HISSY +HIST +HISTS +HIT +HITCH +HITS +HIVE +HIVED +HIVES +HM +HMM +HO +HOAGY +HOAR +HOARD +HOARS +HOARY +HOAX +HOB +HOBBY +HOBO +HOBOS +HOBS +HOCK +HOCKS +HOCUS +HOD +HODAD +HODS +HOE +HOED +HOER +HOERS +HOES +HOG +HOGAN +HOGG +HOGGS +HOGS +HOICK +HOISE +HOIST +HOKE +HOKED +HOKES +HOKEY +HOKKU +HOKUM +HOLD +HOLDS +HOLE +HOLED +HOLES +HOLEY +HOLK +HOLKS +HOLLA +HOLLO +HOLLY +HOLM +HOLMS +HOLP +HOLS +HOLT +HOLTS +HOLY +HOME +HOMED +HOMER +HOMES +HOMEY +HOMO +HOMOS +HOMY +HON +HONAN +HONDA +HONE +HONED +HONER +HONES +HONEY +HONG +HONGS +HONK +HONKS +HONKY +HONOR +HONS +HOOCH +HOOD +HOODS +HOODY +HOOEY +HOOF +HOOFS +HOOK +HOOKA +HOOKS +HOOKY +HOOLY +HOOP +HOOPS +HOOT +HOOTS +HOOTY +HOP +HOPE +HOPED +HOPER +HOPES +HOPPY +HOPS +HORA +HORAH +HORAL +HORAS +HORDE +HORN +HORNS +HORNY +HORSE +HORST +HORSY +HOSE +HOSED +HOSEL +HOSEN +HOSES +HOST +HOSTA +HOSTS +HOT +HOTCH +HOTEL +HOTLY +HOTS +HOUND +HOUR +HOURI +HOURS +HOUSE +HOVE +HOVEL +HOVER +HOW +HOWDY +HOWE +HOWES +HOWF +HOWFF +HOWFS +HOWK +HOWKS +HOWL +HOWLS +HOWS +HOY +HOYA +HOYAS +HOYLE +HOYS +HUB +HUBBY +HUBS +HUCK +HUCKS +HUE +HUED +HUES +HUFF +HUFFS +HUFFY +HUG +HUGE +HUGER +HUGS +HUH +HUIC +HULA +HULAS +HULK +HULKS +HULKY +HULL +HULLO +HULLS +HUM +HUMAN +HUMIC +HUMID +HUMOR +HUMP +HUMPH +HUMPS +HUMPY +HUMS +HUMUS +HUN +HUNCH +HUNG +HUNH +HUNK +HUNKS +HUNKY +HUNS +HUNT +HUNTS +HUP +HURDS +HURL +HURLS +HURLY +HURRY +HURST +HURT +HURTS +HUSH +HUSK +HUSKS +HUSKY +HUSSY +HUT +HUTCH +HUTS +HUZZA +HWAN +HYDRA +HYDRO +HYENA +HYING +HYLA +HYLAS +HYMEN +HYMN +HYMNS +HYOID +HYP +HYPE +HYPED +HYPER +HYPES +HYPHA +HYPO +HYPOS +HYPS +HYRAX +HYSON +HYTE +IAMB +IAMBI +IAMBS +IBEX +IBIS +ICE +ICED +ICES +ICH +ICHOR +ICHS +ICIER +ICILY +ICING +ICK +ICKER +ICKY +ICON +ICONS +ICTIC +ICTUS +ICY +ID +IDEA +IDEAL +IDEAS +IDEM +IDES +IDIOM +IDIOT +IDLE +IDLED +IDLER +IDLES +IDLY +IDOL +IDOLS +IDS +IDYL +IDYLL +IDYLS +IF +IFF +IFFY +IFS +IGLOO +IGLU +IGLUS +IHRAM +IKAT +IKATS +IKON +IKONS +ILEA +ILEAC +ILEAL +ILEUM +ILEUS +ILEX +ILIA +ILIAC +ILIAD +ILIAL +ILIUM +ILK +ILKA +ILKS +ILL +ILLER +ILLS +ILLY +IMAGE +IMAGO +IMAM +IMAMS +IMAUM +IMBED +IMBUE +IMID +IMIDE +IMIDO +IMIDS +IMINE +IMINO +IMMIX +IMMY +IMP +IMPED +IMPEL +IMPI +IMPIS +IMPLY +IMPS +IN +INANE +INAPT +INARM +INBY +INBYE +INCH +INCOG +INCUR +INCUS +INDEX +INDIE +INDOL +INDOW +INDRI +INDUE +INEPT +INERT +INFER +INFIX +INFO +INFOS +INFRA +INGLE +INGOT +INIA +INION +INK +INKED +INKER +INKLE +INKS +INKY +INLAY +INLET +INLY +INN +INNED +INNER +INNS +INPUT +INRO +INS +INSET +INTER +INTI +INTIS +INTO +INTRO +INURE +INURN +INVAR +IODIC +IODID +IODIN +ION +IONIC +IONS +IOTA +IOTAS +IRADE +IRATE +IRE +IRED +IRES +IRID +IRIDS +IRING +IRIS +IRK +IRKED +IRKS +IROKO +IRON +IRONE +IRONS +IRONY +IS +ISBA +ISBAS +ISLE +ISLED +ISLES +ISLET +ISM +ISMS +ISSEI +ISSUE +ISTLE +IT +ITCH +ITCHY +ITEM +ITEMS +ITHER +ITS +IVIED +IVIES +IVORY +IVY +IWIS +IXIA +IXIAS +IXORA +IXTLE +IZAR +IZARS +JAB +JABOT +JABS +JACAL +JACK +JACKS +JACKY +JADE +JADED +JADES +JAG +JAGER +JAGG +JAGGS +JAGGY +JAGRA +JAGS +JAIL +JAILS +JAKE +JAKES +JALAP +JALOP +JAM +JAMB +JAMBE +JAMBS +JAMMY +JAMS +JANE +JANES +JANTY +JAPAN +JAPE +JAPED +JAPER +JAPES +JAR +JARL +JARLS +JARS +JATO +JATOS +JAUK +JAUKS +JAUNT +JAUP +JAUPS +JAVA +JAVAS +JAW +JAWAN +JAWED +JAWS +JAY +JAYS +JAZZ +JAZZY +JEAN +JEANS +JEBEL +JEE +JEED +JEEP +JEEPS +JEER +JEERS +JEES +JEEZ +JEFE +JEFES +JEHAD +JEHU +JEHUS +JELL +JELLS +JELLY +JEMMY +JENNY +JEON +JERID +JERK +JERKS +JERKY +JERRY +JESS +JESSE +JEST +JESTS +JET +JETE +JETES +JETON +JETS +JETTY +JEU +JEUX +JEW +JEWED +JEWEL +JEWS +JIAO +JIB +JIBB +JIBBS +JIBE +JIBED +JIBER +JIBES +JIBS +JIFF +JIFFS +JIFFY +JIG +JIGS +JIHAD +JILL +JILLS +JILT +JILTS +JIMMY +JIMP +JIMPY +JIN +JINGO +JINK +JINKS +JINN +JINNI +JINNS +JINS +JINX +JISM +JISMS +JIVE +JIVED +JIVER +JIVES +JIVEY +JNANA +JO +JOB +JOBS +JOCK +JOCKO +JOCKS +JOE +JOES +JOEY +JOEYS +JOG +JOGS +JOHN +JOHNS +JOIN +JOINS +JOINT +JOIST +JOKE +JOKED +JOKER +JOKES +JOKEY +JOKY +JOLE +JOLES +JOLLY +JOLT +JOLTS +JOLTY +JONES +JORAM +JORUM +JOSH +JOSS +JOT +JOTA +JOTAS +JOTS +JOTTY +JOUAL +JOUK +JOUKS +JOULE +JOUST +JOW +JOWAR +JOWED +JOWL +JOWLS +JOWLY +JOWS +JOY +JOYED +JOYS +JUBA +JUBAS +JUBE +JUBES +JUDAS +JUDGE +JUDO +JUDOS +JUG +JUGA +JUGAL +JUGS +JUGUM +JUICE +JUICY +JUJU +JUJUS +JUKE +JUKED +JUKES +JULEP +JUMBO +JUMP +JUMPS +JUMPY +JUN +JUNCO +JUNK +JUNKS +JUNKY +JUNTA +JUNTO +JUPE +JUPES +JUPON +JURA +JURAL +JURAT +JUREL +JUROR +JURY +JUS +JUST +JUSTS +JUT +JUTE +JUTES +JUTS +JUTTY +KA +KAAS +KAB +KABAB +KABAR +KABOB +KABS +KADI +KADIS +KAE +KAES +KAF +KAFIR +KAFS +KAGU +KAGUS +KAIAK +KAIF +KAIFS +KAIL +KAILS +KAIN +KAINS +KAKA +KAKAS +KAKI +KAKIS +KALAM +KALE +KALES +KALIF +KALPA +KAME +KAMES +KAMI +KAMIK +KANA +KANAS +KANE +KANES +KANJI +KAON +KAONS +KAPA +KAPAS +KAPH +KAPHS +KAPOK +KAPPA +KAPUT +KARAT +KARMA +KARN +KARNS +KAROO +KARST +KART +KARTS +KAS +KASHA +KAT +KATA +KATAS +KATS +KAURI +KAURY +KAVA +KAVAS +KAY +KAYAK +KAYO +KAYOS +KAYS +KAZOO +KBAR +KBARS +KEA +KEAS +KEBAB +KEBAR +KEBOB +KECK +KECKS +KEDGE +KEEF +KEEFS +KEEK +KEEKS +KEEL +KEELS +KEEN +KEENS +KEEP +KEEPS +KEET +KEETS +KEEVE +KEF +KEFIR +KEFS +KEG +KEGS +KEIR +KEIRS +KELEP +KELIM +KELLY +KELP +KELPS +KELPY +KEMP +KEMPS +KEMPT +KEN +KENAF +KENCH +KENDO +KENO +KENOS +KENS +KENT +KEP +KEPI +KEPIS +KEPS +KEPT +KERB +KERBS +KERF +KERFS +KERN +KERNE +KERNS +KERRY +KETCH +KETO +KETOL +KEVEL +KEVIL +KEX +KEXES +KEY +KEYED +KEYS +KHADI +KHAF +KHAFS +KHAKI +KHAN +KHANS +KHAPH +KHAT +KHATS +KHEDA +KHET +KHETH +KHETS +KHI +KHIS +KHOUM +KIANG +KIBBE +KIBBI +KIBE +KIBEI +KIBES +KIBLA +KICK +KICKS +KICKY +KID +KIDDO +KIDDY +KIDS +KIEF +KIEFS +KIER +KIERS +KIF +KIFS +KIKE +KIKES +KILIM +KILL +KILLS +KILN +KILNS +KILO +KILOS +KILT +KILTS +KILTY +KIN +KINA +KINAS +KIND +KINDS +KINE +KINES +KING +KINGS +KININ +KINK +KINKS +KINKY +KINO +KINOS +KINS +KIOSK +KIP +KIPS +KIR +KIRK +KIRKS +KIRN +KIRNS +KIRS +KISS +KISSY +KIST +KISTS +KIT +KITE +KITED +KITER +KITES +KITH +KITHE +KITHS +KITS +KITTY +KIVA +KIVAS +KIWI +KIWIS +KLONG +KLOOF +KLUGE +KLUTZ +KNACK +KNAP +KNAPS +KNAR +KNARS +KNAUR +KNAVE +KNEAD +KNEE +KNEED +KNEEL +KNEES +KNELL +KNELT +KNEW +KNIFE +KNISH +KNIT +KNITS +KNOB +KNOBS +KNOCK +KNOLL +KNOP +KNOPS +KNOSP +KNOT +KNOTS +KNOUT +KNOW +KNOWN +KNOWS +KNUR +KNURL +KNURS +KOA +KOALA +KOAN +KOANS +KOAS +KOB +KOBO +KOBS +KOEL +KOELS +KOHL +KOHLS +KOI +KOINE +KOLA +KOLAS +KOLO +KOLOS +KONK +KONKS +KOOK +KOOKS +KOOKY +KOP +KOPEK +KOPH +KOPHS +KOPJE +KOPPA +KOPS +KOR +KORAI +KORAT +KORE +KORS +KORUN +KOS +KOSS +KOTO +KOTOS +KOTOW +KRAAL +KRAFT +KRAIT +KRAUT +KREEP +KRILL +KRIS +KRONA +KRONE +KROON +KRUBI +KUDO +KUDOS +KUDU +KUDUS +KUDZU +KUE +KUES +KUGEL +KUKRI +KULAK +KUMYS +KURTA +KURU +KURUS +KUSSO +KVAS +KVASS +KYACK +KYAK +KYAKS +KYAR +KYARS +KYAT +KYATS +KYLIX +KYRIE +KYTE +KYTES +KYTHE +LA +LAARI +LAB +LABEL +LABIA +LABOR +LABRA +LABS +LAC +LACE +LACED +LACER +LACES +LACEY +LACK +LACKS +LACS +LACY +LAD +LADE +LADED +LADEN +LADER +LADES +LADLE +LADS +LADY +LAEVO +LAG +LAGAN +LAGER +LAGS +LAHAR +LAIC +LAICH +LAICS +LAID +LAIGH +LAIN +LAIR +LAIRD +LAIRS +LAITH +LAITY +LAKE +LAKED +LAKER +LAKES +LAKH +LAKHS +LAKY +LALL +LALLS +LAM +LAMA +LAMAS +LAMB +LAMBS +LAMBY +LAME +LAMED +LAMER +LAMES +LAMIA +LAMP +LAMPS +LAMS +LANAI +LANCE +LAND +LANDS +LANE +LANES +LANG +LANK +LANKY +LAP +LAPEL +LAPIN +LAPIS +LAPS +LAPSE +LAR +LARCH +LARD +LARDS +LARDY +LAREE +LARES +LARGE +LARGO +LARI +LARIS +LARK +LARKS +LARKY +LARS +LARUM +LARVA +LAS +LASE +LASED +LASER +LASES +LASH +LASS +LASSO +LAST +LASTS +LAT +LATCH +LATE +LATED +LATEN +LATER +LATEX +LATH +LATHE +LATHI +LATHS +LATHY +LATI +LATKE +LATS +LATTE +LAUAN +LAUD +LAUDS +LAUGH +LAURA +LAV +LAVA +LAVAS +LAVE +LAVED +LAVER +LAVES +LAVS +LAW +LAWED +LAWN +LAWNS +LAWNY +LAWS +LAX +LAXER +LAXLY +LAY +LAYED +LAYER +LAYS +LAYUP +LAZAR +LAZE +LAZED +LAZES +LAZY +LEA +LEACH +LEAD +LEADS +LEADY +LEAF +LEAFS +LEAFY +LEAK +LEAKS +LEAKY +LEAL +LEAN +LEANS +LEANT +LEAP +LEAPS +LEAPT +LEAR +LEARN +LEARS +LEARY +LEAS +LEASE +LEASH +LEAST +LEAVE +LEAVY +LEBEN +LECH +LED +LEDGE +LEDGY +LEE +LEECH +LEEK +LEEKS +LEER +LEERS +LEERY +LEES +LEET +LEETS +LEFT +LEFTS +LEFTY +LEG +LEGAL +LEGER +LEGES +LEGGY +LEGIT +LEGS +LEHR +LEHRS +LEHUA +LEI +LEIS +LEK +LEKE +LEKS +LEKU +LEMAN +LEMMA +LEMON +LEMUR +LEND +LENDS +LENES +LENIS +LENO +LENOS +LENS +LENSE +LENT +LENTO +LEONE +LEPER +LEPT +LEPTA +LESS +LEST +LET +LETCH +LETHE +LETS +LETUP +LEU +LEUD +LEUDS +LEV +LEVA +LEVEE +LEVEL +LEVER +LEVIN +LEVO +LEVY +LEWD +LEWIS +LEX +LEXES +LEXIS +LEY +LEYS +LEZ +LEZZY +LI +LIANA +LIANE +LIANG +LIAR +LIARD +LIARS +LIB +LIBEL +LIBER +LIBRA +LIBRI +LIBS +LICE +LICH +LICHI +LICHT +LICIT +LICK +LICKS +LID +LIDAR +LIDO +LIDOS +LIDS +LIE +LIED +LIEF +LIEGE +LIEN +LIENS +LIER +LIERS +LIES +LIEU +LIEUS +LIEVE +LIFE +LIFER +LIFT +LIFTS +LIGAN +LIGER +LIGHT +LIKE +LIKED +LIKEN +LIKER +LIKES +LILAC +LILT +LILTS +LILY +LIMA +LIMAN +LIMAS +LIMB +LIMBA +LIMBI +LIMBO +LIMBS +LIMBY +LIME +LIMED +LIMEN +LIMES +LIMEY +LIMIT +LIMN +LIMNS +LIMO +LIMOS +LIMP +LIMPA +LIMPS +LIMY +LIN +LINAC +LINDY +LINE +LINED +LINEN +LINER +LINES +LINEY +LING +LINGA +LINGO +LINGS +LINGY +LININ +LINK +LINKS +LINKY +LINN +LINNS +LINO +LINOS +LINS +LINT +LINTS +LINTY +LINUM +LINY +LION +LIONS +LIP +LIPID +LIPIN +LIPPY +LIPS +LIRA +LIRAS +LIRE +LIRI +LIROT +LIS +LISLE +LISP +LISPS +LIST +LISTS +LIT +LITAI +LITAS +LITE +LITER +LITHE +LITHO +LITRE +LITS +LITU +LIVE +LIVED +LIVEN +LIVER +LIVES +LIVID +LIVRE +LLAMA +LLANO +LO +LOACH +LOAD +LOADS +LOAF +LOAFS +LOAM +LOAMS +LOAMY +LOAN +LOANS +LOATH +LOB +LOBAR +LOBBY +LOBE +LOBED +LOBES +LOBO +LOBOS +LOBS +LOCA +LOCAL +LOCH +LOCHS +LOCI +LOCK +LOCKS +LOCO +LOCOS +LOCUM +LOCUS +LODE +LODEN +LODES +LODGE +LOESS +LOFT +LOFTS +LOFTY +LOG +LOGAN +LOGE +LOGES +LOGGY +LOGIA +LOGIC +LOGO +LOGOI +LOGOS +LOGS +LOGY +LOIN +LOINS +LOLL +LOLLS +LOLLY +LONE +LONER +LONG +LONGE +LONGS +LOO +LOOBY +LOOED +LOOEY +LOOF +LOOFA +LOOFS +LOOIE +LOOK +LOOKS +LOOM +LOOMS +LOON +LOONS +LOONY +LOOP +LOOPS +LOOPY +LOOS +LOOSE +LOOT +LOOTS +LOP +LOPE +LOPED +LOPER +LOPES +LOPPY +LOPS +LORAL +LORAN +LORD +LORDS +LORE +LORES +LORIS +LORN +LORRY +LORY +LOSE +LOSEL +LOSER +LOSES +LOSS +LOSSY +LOST +LOT +LOTA +LOTAH +LOTAS +LOTH +LOTI +LOTIC +LOTOS +LOTS +LOTTE +LOTTO +LOTUS +LOUD +LOUGH +LOUIE +LOUIS +LOUP +LOUPE +LOUPS +LOUR +LOURS +LOURY +LOUSE +LOUSY +LOUT +LOUTS +LOVAT +LOVE +LOVED +LOVER +LOVES +LOW +LOWE +LOWED +LOWER +LOWES +LOWLY +LOWN +LOWS +LOWSE +LOX +LOXED +LOXES +LOYAL +LUAU +LUAUS +LUBE +LUBES +LUCE +LUCES +LUCID +LUCK +LUCKS +LUCKY +LUCRE +LUDE +LUDES +LUDIC +LUES +LUFF +LUFFA +LUFFS +LUG +LUGE +LUGED +LUGER +LUGES +LUGS +LULL +LULLS +LULU +LULUS +LUM +LUMEN +LUMP +LUMPS +LUMPY +LUMS +LUNA +LUNAR +LUNAS +LUNCH +LUNE +LUNES +LUNET +LUNG +LUNGE +LUNGI +LUNGS +LUNK +LUNKS +LUNT +LUNTS +LUNY +LUPIN +LUPUS +LURCH +LURE +LURED +LURER +LURES +LURID +LURK +LURKS +LUSH +LUST +LUSTS +LUSTY +LUSUS +LUTE +LUTEA +LUTED +LUTES +LUTZ +LUV +LUVS +LUX +LUXE +LUXES +LWEI +LWEIS +LYARD +LYART +LYASE +LYCEA +LYCEE +LYE +LYES +LYING +LYMPH +LYNCH +LYNX +LYRE +LYRES +LYRIC +LYSE +LYSED +LYSES +LYSIN +LYSIS +LYSSA +LYTIC +LYTTA +MA +MAAR +MAARS +MABE +MABES +MAC +MACAW +MACE +MACED +MACER +MACES +MACH +MACHE +MACHO +MACHS +MACK +MACKS +MACLE +MACON +MACRO +MACS +MAD +MADAM +MADE +MADLY +MADRE +MADS +MAE +MAES +MAFIA +MAFIC +MAG +MAGE +MAGES +MAGI +MAGIC +MAGMA +MAGOT +MAGS +MAGUS +MAHOE +MAID +MAIDS +MAIL +MAILE +MAILL +MAILS +MAIM +MAIMS +MAIN +MAINS +MAIR +MAIRS +MAIST +MAIZE +MAJOR +MAKAR +MAKE +MAKER +MAKES +MAKO +MAKOS +MALAR +MALE +MALES +MALIC +MALL +MALLS +MALM +MALMS +MALMY +MALT +MALTS +MALTY +MAMA +MAMAS +MAMBA +MAMBO +MAMEY +MAMIE +MAMMA +MAMMY +MAN +MANA +MANAS +MANE +MANED +MANES +MANGE +MANGO +MANGY +MANIA +MANIC +MANLY +MANNA +MANO +MANOR +MANOS +MANS +MANSE +MANTA +MANUS +MANY +MAP +MAPLE +MAPS +MAQUI +MAR +MARC +MARCH +MARCS +MARE +MARES +MARGE +MARIA +MARK +MARKS +MARL +MARLS +MARLY +MARRY +MARS +MARSE +MARSH +MART +MARTS +MARVY +MAS +MASER +MASH +MASHY +MASK +MASKS +MASON +MASS +MASSA +MASSE +MASSY +MAST +MASTS +MAT +MATCH +MATE +MATED +MATER +MATES +MATEY +MATH +MATHS +MATIN +MATS +MATT +MATTE +MATTS +MATZA +MATZO +MAUD +MAUDS +MAUL +MAULS +MAUN +MAUND +MAUT +MAUTS +MAUVE +MAVEN +MAVIE +MAVIN +MAVIS +MAW +MAWED +MAWN +MAWS +MAX +MAXES +MAXI +MAXIM +MAXIS +MAY +MAYA +MAYAN +MAYAS +MAYBE +MAYED +MAYO +MAYOR +MAYOS +MAYS +MAYST +MAZE +MAZED +MAZER +MAZES +MAZY +MBIRA +ME +MEAD +MEADS +MEAL +MEALS +MEALY +MEAN +MEANS +MEANT +MEANY +MEAT +MEATS +MEATY +MECCA +MED +MEDAL +MEDIA +MEDIC +MEDII +MEED +MEEDS +MEEK +MEET +MEETS +MEINY +MEL +MELD +MELDS +MELEE +MELIC +MELL +MELLS +MELON +MELS +MELT +MELTS +MEM +MEMO +MEMOS +MEMS +MEN +MENAD +MEND +MENDS +MENO +MENSA +MENSE +MENTA +MENU +MENUS +MEOU +MEOUS +MEOW +MEOWS +MERCY +MERDE +MERE +MERER +MERES +MERGE +MERIT +MERK +MERKS +MERL +MERLE +MERLS +MERRY +MESA +MESAS +MESH +MESHY +MESIC +MESNE +MESON +MESS +MESSY +MET +META +METAL +METE +METED +METER +METES +METH +METHS +METIS +METRE +METRO +MEW +MEWED +MEWL +MEWLS +MEWS +MEZE +MEZES +MEZZO +MHO +MHOS +MI +MIAOU +MIAOW +MIASM +MIAUL +MIB +MIBS +MICA +MICAS +MICE +MICHE +MICK +MICKS +MICRA +MICRO +MID +MIDDY +MIDGE +MIDI +MIDIS +MIDS +MIDST +MIEN +MIENS +MIFF +MIFFS +MIFFY +MIG +MIGG +MIGGS +MIGHT +MIGS +MIKE +MIKED +MIKES +MIKRA +MIL +MILCH +MILD +MILE +MILER +MILES +MILIA +MILK +MILKS +MILKY +MILL +MILLE +MILLS +MILO +MILOS +MILPA +MILS +MILT +MILTS +MILTY +MIM +MIME +MIMED +MIMEO +MIMER +MIMES +MIMIC +MINA +MINAE +MINAS +MINCE +MINCY +MIND +MINDS +MINE +MINED +MINER +MINES +MINGY +MINI +MINIM +MINIS +MINK +MINKE +MINKS +MINNY +MINOR +MINT +MINTS +MINTY +MINUS +MINX +MIR +MIRE +MIRED +MIRES +MIREX +MIRI +MIRK +MIRKS +MIRKY +MIRS +MIRTH +MIRY +MIRZA +MIS +MISDO +MISE +MISER +MISES +MISO +MISOS +MISS +MISSY +MIST +MISTS +MISTY +MITE +MITER +MITES +MITIS +MITRE +MITT +MITTS +MITY +MIX +MIXED +MIXER +MIXES +MIXT +MIXUP +MIZEN +MM +MO +MOA +MOAN +MOANS +MOAS +MOAT +MOATS +MOB +MOBS +MOC +MOCHA +MOCK +MOCKS +MOCS +MOD +MODAL +MODE +MODEL +MODEM +MODES +MODI +MODS +MODUS +MOG +MOGGY +MOGS +MOGUL +MOHEL +MOHUR +MOIL +MOILS +MOIRA +MOIRE +MOIST +MOJO +MOJOS +MOKE +MOKES +MOL +MOLA +MOLAL +MOLAR +MOLAS +MOLD +MOLDS +MOLDY +MOLE +MOLES +MOLL +MOLLS +MOLLY +MOLS +MOLT +MOLTO +MOLTS +MOLY +MOM +MOME +MOMES +MOMI +MOMMA +MOMMY +MOMS +MOMUS +MON +MONAD +MONAS +MONDE +MONDO +MONEY +MONGO +MONIE +MONK +MONKS +MONO +MONOS +MONS +MONTE +MONTH +MONY +MOO +MOOCH +MOOD +MOODS +MOODY +MOOED +MOOL +MOOLA +MOOLS +MOON +MOONS +MOONY +MOOR +MOORS +MOORY +MOOS +MOOSE +MOOT +MOOTS +MOP +MOPE +MOPED +MOPER +MOPES +MOPEY +MOPS +MOPY +MOR +MORA +MORAE +MORAL +MORAS +MORAY +MORE +MOREL +MORES +MORN +MORNS +MORON +MORPH +MORRO +MORS +MORSE +MORT +MORTS +MOS +MOSEY +MOSK +MOSKS +MOSS +MOSSO +MOSSY +MOST +MOSTE +MOSTS +MOT +MOTE +MOTEL +MOTES +MOTET +MOTEY +MOTH +MOTHS +MOTHY +MOTIF +MOTOR +MOTS +MOTT +MOTTE +MOTTO +MOTTS +MOUCH +MOUE +MOUES +MOULD +MOULT +MOUND +MOUNT +MOURN +MOUSE +MOUSY +MOUTH +MOVE +MOVED +MOVER +MOVES +MOVIE +MOW +MOWED +MOWER +MOWN +MOWS +MOXA +MOXAS +MOXIE +MOZO +MOZOS +MU +MUCH +MUCID +MUCIN +MUCK +MUCKS +MUCKY +MUCOR +MUCRO +MUCUS +MUD +MUDDY +MUDRA +MUDS +MUFF +MUFFS +MUFTI +MUG +MUGG +MUGGS +MUGGY +MUGS +MUHLY +MUJIK +MULCH +MULCT +MULE +MULED +MULES +MULEY +MULL +MULLA +MULLS +MUM +MUMM +MUMMS +MUMMY +MUMP +MUMPS +MUMS +MUMU +MUMUS +MUN +MUNCH +MUNGO +MUNI +MUNIS +MUNS +MUON +MUONS +MURA +MURAL +MURAS +MURE +MURED +MURES +MUREX +MURID +MURK +MURKS +MURKY +MURR +MURRA +MURRE +MURRS +MURRY +MUS +MUSCA +MUSE +MUSED +MUSER +MUSES +MUSH +MUSHY +MUSIC +MUSK +MUSKS +MUSKY +MUSS +MUSSY +MUST +MUSTH +MUSTS +MUSTY +MUT +MUTCH +MUTE +MUTED +MUTER +MUTES +MUTON +MUTS +MUTT +MUTTS +MUZZY +MY +MYNA +MYNAH +MYNAS +MYOID +MYOMA +MYOPE +MYOPY +MYRRH +MYSID +MYTH +MYTHS +MYTHY +NA +NAAN +NAANS +NAB +NABE +NABES +NABIS +NABOB +NABS +NACHO +NACRE +NADA +NADAS +NADIR +NAE +NAEVI +NAG +NAGGY +NAGS +NAH +NAIAD +NAIF +NAIFS +NAIL +NAILS +NAIRA +NAIVE +NAKED +NALED +NAM +NAME +NAMED +NAMER +NAMES +NAN +NANA +NANAS +NANCE +NANCY +NANNY +NANS +NAOI +NAOS +NAP +NAPE +NAPES +NAPPE +NAPPY +NAPS +NARC +NARCO +NARCS +NARD +NARDS +NARES +NARIC +NARIS +NARK +NARKS +NARKY +NARY +NASAL +NASTY +NATAL +NATCH +NATES +NATTY +NAVAL +NAVAR +NAVE +NAVEL +NAVES +NAVVY +NAVY +NAW +NAWAB +NAY +NAYS +NAZI +NAZIS +NE +NEAP +NEAPS +NEAR +NEARS +NEAT +NEATH +NEATS +NEB +NEBS +NECK +NECKS +NEE +NEED +NEEDS +NEEDY +NEEM +NEEMS +NEEP +NEEPS +NEGUS +NEIF +NEIFS +NEIGH +NEIST +NELLY +NEMA +NEMAS +NENE +NEON +NEONS +NERD +NERDS +NERDY +NEROL +NERTS +NERTZ +NERVE +NERVY +NESS +NEST +NESTS +NET +NETOP +NETS +NETT +NETTS +NETTY +NEUK +NEUKS +NEUM +NEUME +NEUMS +NEVE +NEVER +NEVES +NEVI +NEVUS +NEW +NEWEL +NEWER +NEWIE +NEWLY +NEWS +NEWSY +NEWT +NEWTS +NEXT +NEXUS +NGWEE +NIB +NIBS +NICAD +NICE +NICER +NICHE +NICK +NICKS +NICOL +NIDAL +NIDE +NIDED +NIDES +NIDI +NIDUS +NIECE +NIEVE +NIFTY +NIGH +NIGHS +NIGHT +NIHIL +NIL +NILL +NILLS +NILS +NIM +NIMBI +NIMS +NINE +NINES +NINJA +NINNY +NINON +NINTH +NIP +NIPA +NIPAS +NIPPY +NIPS +NISEI +NISI +NISUS +NIT +NITE +NITER +NITES +NITID +NITON +NITRE +NITRO +NITS +NITTY +NIVAL +NIX +NIXE +NIXED +NIXES +NIXIE +NIXY +NIZAM +NO +NOB +NOBBY +NOBLE +NOBLY +NOBS +NOCK +NOCKS +NOD +NODAL +NODDY +NODE +NODES +NODI +NODS +NODUS +NOEL +NOELS +NOES +NOG +NOGG +NOGGS +NOGS +NOH +NOHOW +NOIL +NOILS +NOILY +NOIR +NOIRS +NOISE +NOISY +NOLO +NOLOS +NOM +NOMA +NOMAD +NOMAS +NOME +NOMEN +NOMES +NOMOI +NOMOS +NOMS +NONA +NONAS +NONCE +NONE +NONES +NONET +NONYL +NOO +NOOK +NOOKS +NOOKY +NOON +NOONS +NOOSE +NOPAL +NOPE +NOR +NORI +NORIA +NORIS +NORM +NORMS +NORTH +NOS +NOSE +NOSED +NOSES +NOSEY +NOSH +NOSY +NOT +NOTA +NOTAL +NOTCH +NOTE +NOTED +NOTER +NOTES +NOTUM +NOUN +NOUNS +NOUS +NOVA +NOVAE +NOVAS +NOVEL +NOW +NOWAY +NOWS +NOWT +NOWTS +NTH +NU +NUB +NUBBY +NUBIA +NUBS +NUCHA +NUDE +NUDER +NUDES +NUDGE +NUDIE +NUDZH +NUKE +NUKED +NUKES +NULL +NULLS +NUMB +NUMBS +NUMEN +NUN +NUNS +NURD +NURDS +NURL +NURLS +NURSE +NUS +NUT +NUTS +NUTSY +NUTTY +NYALA +NYLON +NYMPH +OAF +OAFS +OAK +OAKEN +OAKS +OAKUM +OAR +OARED +OARS +OASES +OASIS +OAST +OASTS +OAT +OATEN +OATER +OATH +OATHS +OATS +OAVES +OBE +OBEAH +OBELI +OBES +OBESE +OBEY +OBEYS +OBI +OBIA +OBIAS +OBIS +OBIT +OBITS +OBJET +OBOE +OBOES +OBOL +OBOLE +OBOLI +OBOLS +OCA +OCAS +OCCUR +OCEAN +OCHER +OCHRE +OCHRY +OCKER +OCREA +OCTAD +OCTAL +OCTAN +OCTET +OCTYL +OCULI +OD +ODD +ODDER +ODDLY +ODDS +ODE +ODEA +ODEON +ODES +ODEUM +ODIC +ODIST +ODIUM +ODOR +ODORS +ODOUR +ODS +ODYL +ODYLE +ODYLS +OE +OES +OF +OFAY +OFAYS +OFF +OFFAL +OFFED +OFFER +OFFS +OFT +OFTEN +OFTER +OGAM +OGAMS +OGEE +OGEES +OGHAM +OGIVE +OGLE +OGLED +OGLER +OGLES +OGRE +OGRES +OH +OHED +OHIA +OHIAS +OHING +OHM +OHMIC +OHMS +OHO +OHS +OIDIA +OIL +OILED +OILER +OILS +OILY +OINK +OINKS +OKA +OKAPI +OKAS +OKAY +OKAYS +OKE +OKEH +OKEHS +OKES +OKRA +OKRAS +OLD +OLDEN +OLDER +OLDIE +OLDS +OLDY +OLE +OLEA +OLEIC +OLEIN +OLEO +OLEOS +OLES +OLEUM +OLIO +OLIOS +OLIVE +OLLA +OLLAS +OLOGY +OM +OMASA +OMBER +OMBRE +OMEGA +OMEN +OMENS +OMER +OMERS +OMIT +OMITS +OMS +ON +ONCE +ONE +ONERY +ONES +ONION +ONIUM +ONLY +ONS +ONSET +ONTIC +ONTO +ONUS +ONYX +OOH +OOHED +OOHS +OOMPH +OOPS +OORIE +OOT +OOTID +OOTS +OOZE +OOZED +OOZES +OOZY +OP +OPAH +OPAHS +OPAL +OPALS +OPE +OPED +OPEN +OPENS +OPERA +OPES +OPINE +OPING +OPIUM +OPS +OPSIN +OPT +OPTED +OPTIC +OPTS +OPUS +OR +ORA +ORACH +ORAD +ORAL +ORALS +ORANG +ORATE +ORB +ORBED +ORBIT +ORBS +ORBY +ORC +ORCA +ORCAS +ORCIN +ORCS +ORDER +ORDO +ORDOS +ORE +OREAD +ORES +ORGAN +ORGIC +ORGY +ORIBI +ORIEL +ORLE +ORLES +ORLOP +ORMER +ORNIS +ORPIN +ORRA +ORRIS +ORS +ORT +ORTHO +ORTS +ORYX +ORZO +ORZOS +OS +OSAR +OSE +OSES +OSIER +OSMIC +OSMOL +OSSA +OSSIA +OSTIA +OTHER +OTIC +OTTAR +OTTER +OTTO +OTTOS +OUCH +OUD +OUDS +OUGHT +OUNCE +OUPH +OUPHE +OUPHS +OUR +OURIE +OURS +OUSEL +OUST +OUSTS +OUT +OUTBY +OUTDO +OUTED +OUTER +OUTGO +OUTRE +OUTS +OUZEL +OUZO +OUZOS +OVA +OVAL +OVALS +OVARY +OVATE +OVEN +OVENS +OVER +OVERS +OVERT +OVINE +OVOID +OVOLI +OVOLO +OVULE +OVUM +OW +OWE +OWED +OWES +OWING +OWL +OWLET +OWLS +OWN +OWNED +OWNER +OWNS +OWSE +OWSEN +OX +OXBOW +OXEN +OXES +OXEYE +OXID +OXIDE +OXIDS +OXIM +OXIME +OXIMS +OXLIP +OXO +OXTER +OXY +OY +OYER +OYERS +OYES +OYEZ +OZONE +PA +PAC +PACA +PACAS +PACE +PACED +PACER +PACES +PACHA +PACK +PACKS +PACS +PACT +PACTS +PAD +PADDY +PADI +PADIS +PADLE +PADRE +PADRI +PADS +PAEAN +PAEON +PAGAN +PAGE +PAGED +PAGER +PAGES +PAGOD +PAH +PAID +PAIK +PAIKS +PAIL +PAILS +PAIN +PAINS +PAINT +PAIR +PAIRS +PAISA +PAISE +PAL +PALE +PALEA +PALED +PALER +PALES +PALET +PALL +PALLS +PALLY +PALM +PALMS +PALMY +PALP +PALPI +PALPS +PALS +PALSY +PALY +PAM +PAMPA +PAMS +PAN +PANDA +PANDY +PANE +PANED +PANEL +PANES +PANG +PANGA +PANGS +PANIC +PANNE +PANS +PANSY +PANT +PANTO +PANTS +PANTY +PAP +PAPA +PAPAL +PAPAS +PAPAW +PAPER +PAPPI +PAPPY +PAPS +PAR +PARA +PARAS +PARCH +PARD +PARDI +PARDS +PARDY +PARE +PARED +PAREO +PARER +PARES +PAREU +PARGE +PARGO +PARIS +PARK +PARKA +PARKS +PARLE +PAROL +PARR +PARRS +PARRY +PARS +PARSE +PART +PARTS +PARTY +PARVE +PARVO +PAS +PASE +PASEO +PASES +PASH +PASHA +PASS +PASSE +PAST +PASTA +PASTE +PASTS +PASTY +PAT +PATCH +PATE +PATED +PATEN +PATER +PATES +PATH +PATHS +PATIN +PATIO +PATLY +PATS +PATSY +PATTY +PATY +PAUSE +PAVAN +PAVE +PAVED +PAVER +PAVES +PAVID +PAVIN +PAVIS +PAW +PAWED +PAWER +PAWKY +PAWL +PAWLS +PAWN +PAWNS +PAWS +PAX +PAXES +PAY +PAYED +PAYEE +PAYER +PAYOR +PAYS +PE +PEA +PEACE +PEACH +PEAG +PEAGE +PEAGS +PEAK +PEAKS +PEAKY +PEAL +PEALS +PEAN +PEANS +PEAR +PEARL +PEARS +PEART +PEAS +PEASE +PEAT +PEATS +PEATY +PEAVY +PEC +PECAN +PECH +PECHS +PECK +PECKS +PECKY +PECS +PED +PEDAL +PEDES +PEDRO +PEDS +PEE +PEED +PEEK +PEEKS +PEEL +PEELS +PEEN +PEENS +PEEP +PEEPS +PEER +PEERS +PEERY +PEES +PEEVE +PEG +PEGS +PEH +PEHS +PEIN +PEINS +PEISE +PEKAN +PEKE +PEKES +PEKIN +PEKOE +PELE +PELES +PELF +PELFS +PELON +PELT +PELTS +PEN +PENAL +PENCE +PEND +PENDS +PENES +PENGO +PENIS +PENNA +PENNE +PENNI +PENNY +PENS +PENT +PEON +PEONS +PEONY +PEP +PEPLA +PEPO +PEPOS +PEPPY +PEPS +PER +PERCH +PERDU +PERDY +PEREA +PERI +PERIL +PERIS +PERK +PERKS +PERKY +PERM +PERMS +PERRY +PERSE +PERT +PES +PESKY +PESO +PESOS +PEST +PESTO +PESTS +PESTY +PET +PETAL +PETER +PETIT +PETS +PETTI +PETTO +PETTY +PEW +PEWEE +PEWIT +PEWS +PFFT +PFUI +PHAGE +PHASE +PHAT +PHEW +PHI +PHIAL +PHIS +PHIZ +PHLOX +PHON +PHONE +PHONO +PHONS +PHONY +PHOT +PHOTO +PHOTS +PHPHT +PHT +PHUT +PHUTS +PHYLA +PHYLE +PI +PIA +PIAL +PIAN +PIANO +PIANS +PIAS +PIBAL +PIC +PICA +PICAL +PICAS +PICE +PICK +PICKS +PICKY +PICOT +PICS +PICUL +PIE +PIECE +PIED +PIER +PIERS +PIES +PIETA +PIETY +PIG +PIGGY +PIGMY +PIGS +PIING +PIKA +PIKAS +PIKE +PIKED +PIKER +PIKES +PIKI +PIKIS +PILAF +PILAR +PILAU +PILAW +PILE +PILEA +PILED +PILEI +PILES +PILI +PILIS +PILL +PILLS +PILOT +PILUS +PILY +PIMA +PIMAS +PIMP +PIMPS +PIN +PINA +PINAS +PINCH +PINE +PINED +PINES +PINEY +PING +PINGO +PINGS +PINK +PINKO +PINKS +PINKY +PINNA +PINNY +PINON +PINOT +PINS +PINT +PINTA +PINTO +PINTS +PINUP +PINY +PION +PIONS +PIOUS +PIP +PIPAL +PIPE +PIPED +PIPER +PIPES +PIPET +PIPIT +PIPS +PIPY +PIQUE +PIRN +PIRNS +PIROG +PIS +PISCO +PISH +PISO +PISOS +PISS +PISTE +PIT +PITA +PITAS +PITCH +PITH +PITHS +PITHY +PITON +PITS +PITY +PIU +PIVOT +PIX +PIXEL +PIXES +PIXIE +PIXY +PIZZA +PLACE +PLACK +PLAGE +PLAID +PLAIN +PLAIT +PLAN +PLANE +PLANK +PLANS +PLANT +PLASH +PLASM +PLAT +PLATE +PLATS +PLATY +PLAY +PLAYA +PLAYS +PLAZA +PLEA +PLEAD +PLEAS +PLEAT +PLEB +PLEBE +PLEBS +PLED +PLENA +PLEW +PLEWS +PLICA +PLIE +PLIED +PLIER +PLIES +PLINK +PLOD +PLODS +PLONK +PLOP +PLOPS +PLOT +PLOTS +PLOTZ +PLOW +PLOWS +PLOY +PLOYS +PLUCK +PLUG +PLUGS +PLUM +PLUMB +PLUME +PLUMP +PLUMS +PLUMY +PLUNK +PLUS +PLUSH +PLY +PLYER +POACH +POCK +POCKS +POCKY +POCO +POD +PODGY +PODIA +PODS +POEM +POEMS +POESY +POET +POETS +POGEY +POGY +POH +POI +POILU +POIND +POINT +POIS +POISE +POKE +POKED +POKER +POKES +POKEY +POKY +POL +POLAR +POLE +POLED +POLER +POLES +POLIO +POLIS +POLKA +POLL +POLLS +POLO +POLOS +POLS +POLY +POLYP +POLYS +POM +POME +POMES +POMMY +POMP +POMPS +POMS +PONCE +POND +PONDS +PONE +PONES +PONG +PONGS +PONS +PONY +POOCH +POOD +POODS +POOF +POOFS +POOFY +POOH +POOHS +POOL +POOLS +POON +POONS +POOP +POOPS +POOR +POORI +POOVE +POP +POPE +POPES +POPPA +POPPY +POPS +POPSY +PORCH +PORE +PORED +PORES +PORGY +PORK +PORKS +PORKY +PORN +PORNO +PORNS +PORNY +PORT +PORTS +POSE +POSED +POSER +POSES +POSH +POSIT +POSSE +POST +POSTS +POSY +POT +POTS +POTSY +POTTO +POTTY +POUCH +POUF +POUFF +POUFS +POULT +POUND +POUR +POURS +POUT +POUTS +POUTY +POW +POWER +POWS +POX +POXED +POXES +POYOU +PRAAM +PRAHU +PRAM +PRAMS +PRANG +PRANK +PRAO +PRAOS +PRASE +PRAT +PRATE +PRATS +PRAU +PRAUS +PRAWN +PRAY +PRAYS +PREE +PREED +PREEN +PREES +PREP +PREPS +PRESA +PRESE +PRESS +PREST +PREX +PREXY +PREY +PREYS +PREZ +PRICE +PRICK +PRICY +PRIDE +PRIED +PRIER +PRIES +PRIG +PRIGS +PRILL +PRIM +PRIMA +PRIME +PRIMI +PRIMO +PRIMP +PRIMS +PRINK +PRINT +PRION +PRIOR +PRISE +PRISM +PRISS +PRIVY +PRIZE +PRO +PROA +PROAS +PROBE +PROD +PRODS +PROEM +PROF +PROFS +PROG +PROGS +PROLE +PROM +PROMO +PROMS +PRONE +PRONG +PROOF +PROP +PROPS +PROS +PROSE +PROSO +PROSS +PROST +PROSY +PROUD +PROVE +PROW +PROWL +PROWS +PROXY +PRUDE +PRUNE +PRUTA +PRY +PRYER +PSALM +PSEUD +PSHAW +PSI +PSIS +PSOAE +PSOAI +PSOAS +PSST +PSYCH +PUB +PUBES +PUBIC +PUBIS +PUBS +PUCE +PUCES +PUCK +PUCKA +PUCKS +PUD +PUDGY +PUDIC +PUDS +PUFF +PUFFS +PUFFY +PUG +PUGGY +PUGH +PUGS +PUJA +PUJAH +PUJAS +PUKE +PUKED +PUKES +PUKKA +PUL +PULA +PULE +PULED +PULER +PULES +PULI +PULIK +PULIS +PULL +PULLS +PULP +PULPS +PULPY +PULS +PULSE +PUMA +PUMAS +PUMP +PUMPS +PUN +PUNA +PUNAS +PUNCH +PUNG +PUNGS +PUNK +PUNKA +PUNKS +PUNKY +PUNNY +PUNS +PUNT +PUNTO +PUNTS +PUNTY +PUNY +PUP +PUPA +PUPAE +PUPAL +PUPAS +PUPIL +PUPPY +PUPS +PUR +PURDA +PURE +PUREE +PURER +PURGE +PURI +PURIN +PURIS +PURL +PURLS +PURR +PURRS +PURS +PURSE +PURSY +PUS +PUSES +PUSH +PUSHY +PUSS +PUSSY +PUT +PUTON +PUTS +PUTT +PUTTI +PUTTO +PUTTS +PUTTY +PUTZ +PYA +PYAS +PYE +PYES +PYGMY +PYIC +PYIN +PYINS +PYLON +PYOID +PYRAN +PYRE +PYRES +PYRIC +PYX +PYXES +PYXIE +PYXIS +QAID +QAIDS +QANAT +QAT +QATS +QOPH +QOPHS +QUA +QUACK +QUAD +QUADS +QUAFF +QUAG +QUAGS +QUAI +QUAIL +QUAIS +QUAKE +QUAKY +QUALE +QUALM +QUANT +QUARE +QUARK +QUART +QUASH +QUASI +QUASS +QUATE +QUAY +QUAYS +QUEAN +QUEEN +QUEER +QUELL +QUERN +QUERY +QUEST +QUEUE +QUEY +QUEYS +QUICK +QUID +QUIDS +QUIET +QUIFF +QUILL +QUILT +QUIN +QUINS +QUINT +QUIP +QUIPS +QUIPU +QUIRE +QUIRK +QUIRT +QUIT +QUITE +QUITS +QUIZ +QUOD +QUODS +QUOIN +QUOIT +QUOTA +QUOTE +QUOTH +QURSH +RABAT +RABBI +RABIC +RABID +RACE +RACED +RACER +RACES +RACK +RACKS +RACON +RACY +RAD +RADAR +RADII +RADIO +RADIX +RADON +RADS +RAFF +RAFFS +RAFT +RAFTS +RAG +RAGA +RAGAS +RAGE +RAGED +RAGEE +RAGES +RAGGY +RAGI +RAGIS +RAGS +RAH +RAIA +RAIAS +RAID +RAIDS +RAIL +RAILS +RAIN +RAINS +RAINY +RAISE +RAJ +RAJA +RAJAH +RAJAS +RAJES +RAKE +RAKED +RAKEE +RAKER +RAKES +RAKI +RAKIS +RALE +RALES +RALLY +RALPH +RAM +RAMEE +RAMET +RAMI +RAMIE +RAMMY +RAMP +RAMPS +RAMS +RAMUS +RAN +RANCE +RANCH +RAND +RANDS +RANDY +RANEE +RANG +RANGE +RANGY +RANI +RANID +RANIS +RANK +RANKS +RANT +RANTS +RAP +RAPE +RAPED +RAPER +RAPES +RAPHE +RAPID +RAPS +RAPT +RARE +RARED +RARER +RARES +RAS +RASE +RASED +RASER +RASES +RASH +RASP +RASPS +RASPY +RAT +RATAL +RATAN +RATCH +RATE +RATED +RATEL +RATER +RATES +RATH +RATHE +RATIO +RATO +RATOS +RATS +RATTY +RAVE +RAVED +RAVEL +RAVEN +RAVER +RAVES +RAVIN +RAW +RAWER +RAWIN +RAWLY +RAWS +RAX +RAXED +RAXES +RAY +RAYA +RAYAH +RAYAS +RAYED +RAYON +RAYS +RAZE +RAZED +RAZEE +RAZER +RAZES +RAZOR +RAZZ +RE +REACH +REACT +READ +READD +READS +READY +REAL +REALM +REALS +REAM +REAMS +REAP +REAPS +REAR +REARM +REARS +REATA +REAVE +REB +REBAR +REBBE +REBEC +REBEL +REBID +REBOP +REBS +REBUS +REBUT +REBUY +REC +RECAP +RECCE +RECK +RECKS +RECON +RECS +RECTA +RECTI +RECTO +RECUR +RECUT +RED +REDAN +REDD +REDDS +REDE +REDED +REDES +REDIA +REDID +REDIP +REDLY +REDO +REDON +REDOS +REDOX +REDRY +REDS +REDUB +REDUX +REDYE +REE +REED +REEDS +REEDY +REEF +REEFS +REEFY +REEK +REEKS +REEKY +REEL +REELS +REES +REEST +REEVE +REF +REFED +REFEL +REFER +REFIT +REFIX +REFLY +REFRY +REFS +REFT +REG +REGAL +REGES +REGMA +REGNA +REGS +REHAB +REHEM +REI +REIF +REIFS +REIFY +REIGN +REIN +REINK +REINS +REIS +REIVE +REKEY +RELAX +RELAY +RELET +RELIC +RELIT +RELY +REM +REMAN +REMAP +REMET +REMEX +REMIT +REMIX +REMS +RENAL +REND +RENDS +RENEW +RENIG +RENIN +RENT +RENTE +RENTS +REOIL +REP +REPAY +REPEG +REPEL +REPIN +REPLY +REPO +REPOS +REPOT +REPP +REPPS +REPRO +REPS +RERAN +RERIG +RERUN +RES +RESAW +RESAY +RESEE +RESET +RESEW +RESH +RESID +RESIN +RESOD +RESOW +REST +RESTS +RET +RETAG +RETAX +RETCH +RETE +RETEM +RETIA +RETIE +RETRO +RETRY +RETS +REUSE +REV +REVEL +REVET +REVS +REVUE +REWAN +REWAX +REWED +REWET +REWIN +REWON +REX +REXES +RHEA +RHEAS +RHEUM +RHINO +RHO +RHOMB +RHOS +RHUMB +RHUS +RHYME +RHYTA +RIA +RIAL +RIALS +RIANT +RIAS +RIATA +RIB +RIBBY +RIBES +RIBS +RICE +RICED +RICER +RICES +RICH +RICIN +RICK +RICKS +RID +RIDE +RIDER +RIDES +RIDGE +RIDGY +RIDS +RIEL +RIELS +RIF +RIFE +RIFER +RIFF +RIFFS +RIFLE +RIFS +RIFT +RIFTS +RIG +RIGHT +RIGID +RIGOR +RIGS +RILE +RILED +RILES +RILEY +RILL +RILLE +RILLS +RIM +RIME +RIMED +RIMER +RIMES +RIMS +RIMY +RIN +RIND +RINDS +RING +RINGS +RINK +RINKS +RINS +RINSE +RIOJA +RIOT +RIOTS +RIP +RIPE +RIPED +RIPEN +RIPER +RIPES +RIPS +RISE +RISEN +RISER +RISES +RISHI +RISK +RISKS +RISKY +RISUS +RITE +RITES +RITZ +RITZY +RIVAL +RIVE +RIVED +RIVEN +RIVER +RIVES +RIVET +RIYAL +ROACH +ROAD +ROADS +ROAM +ROAMS +ROAN +ROANS +ROAR +ROARS +ROAST +ROB +ROBE +ROBED +ROBES +ROBIN +ROBLE +ROBOT +ROBS +ROC +ROCK +ROCKS +ROCKY +ROCS +ROD +RODE +RODEO +RODS +ROE +ROES +ROGER +ROGUE +ROIL +ROILS +ROILY +ROLE +ROLES +ROLF +ROLFS +ROLL +ROLLS +ROM +ROMAN +ROMEO +ROMP +ROMPS +ROMS +RONDO +ROOD +ROODS +ROOF +ROOFS +ROOK +ROOKS +ROOKY +ROOM +ROOMS +ROOMY +ROOSE +ROOST +ROOT +ROOTS +ROOTY +ROPE +ROPED +ROPER +ROPES +ROPEY +ROPY +ROQUE +ROSE +ROSED +ROSES +ROSET +ROSIN +ROSY +ROT +ROTA +ROTAS +ROTCH +ROTE +ROTES +ROTI +ROTIS +ROTL +ROTLS +ROTO +ROTOR +ROTOS +ROTS +ROTTE +ROUE +ROUEN +ROUES +ROUGE +ROUGH +ROUND +ROUP +ROUPS +ROUPY +ROUSE +ROUST +ROUT +ROUTE +ROUTH +ROUTS +ROUX +ROVE +ROVED +ROVEN +ROVER +ROVES +ROW +ROWAN +ROWDY +ROWED +ROWEL +ROWEN +ROWER +ROWS +ROWTH +ROYAL +RUANA +RUB +RUBE +RUBES +RUBLE +RUBS +RUBUS +RUBY +RUCHE +RUCK +RUCKS +RUDD +RUDDS +RUDDY +RUDE +RUDER +RUE +RUED +RUER +RUERS +RUES +RUFF +RUFFE +RUFFS +RUG +RUGA +RUGAE +RUGAL +RUGBY +RUGS +RUIN +RUING +RUINS +RULE +RULED +RULER +RULES +RULY +RUM +RUMBA +RUMEN +RUMMY +RUMOR +RUMP +RUMPS +RUMS +RUN +RUNE +RUNES +RUNG +RUNGS +RUNIC +RUNNY +RUNS +RUNT +RUNTS +RUNTY +RUPEE +RURAL +RUSE +RUSES +RUSH +RUSHY +RUSK +RUSKS +RUST +RUSTS +RUSTY +RUT +RUTH +RUTHS +RUTIN +RUTS +RUTTY +RYA +RYAS +RYE +RYES +RYKE +RYKED +RYKES +RYND +RYNDS +RYOT +RYOTS +SAB +SABE +SABED +SABER +SABES +SABIN +SABIR +SABLE +SABOT +SABRA +SABRE +SABS +SAC +SACK +SACKS +SACRA +SACS +SAD +SADE +SADES +SADHE +SADHU +SADI +SADIS +SADLY +SAE +SAFE +SAFER +SAFES +SAG +SAGA +SAGAS +SAGE +SAGER +SAGES +SAGGY +SAGO +SAGOS +SAGS +SAGUM +SAGY +SAHIB +SAICE +SAID +SAIDS +SAIGA +SAIL +SAILS +SAIN +SAINS +SAINT +SAITH +SAJOU +SAKE +SAKER +SAKES +SAKI +SAKIS +SAL +SALAD +SALAL +SALE +SALEP +SALES +SALIC +SALL +SALLY +SALMI +SALOL +SALON +SALP +SALPA +SALPS +SALS +SALSA +SALT +SALTS +SALTY +SALVE +SALVO +SAMBA +SAMBO +SAME +SAMEK +SAMP +SAMPS +SAND +SANDS +SANDY +SANE +SANED +SANER +SANES +SANG +SANGA +SANGH +SANK +SANS +SANTO +SAP +SAPID +SAPOR +SAPPY +SAPS +SARAN +SARD +SARDS +SAREE +SARGE +SARI +SARIN +SARIS +SARK +SARKS +SARKY +SAROD +SAROS +SASH +SASIN +SASS +SASSY +SAT +SATAY +SATE +SATED +SATEM +SATES +SATI +SATIN +SATIS +SATYR +SAU +SAUCE +SAUCH +SAUCY +SAUGH +SAUL +SAULS +SAULT +SAUNA +SAURY +SAUTE +SAVE +SAVED +SAVER +SAVES +SAVIN +SAVOR +SAVOY +SAVVY +SAW +SAWED +SAWER +SAWN +SAWS +SAX +SAXES +SAY +SAYER +SAYID +SAYS +SAYST +SCAB +SCABS +SCAD +SCADS +SCAG +SCAGS +SCALD +SCALE +SCALL +SCALP +SCALY +SCAM +SCAMP +SCAMS +SCAN +SCANS +SCANT +SCAPE +SCAR +SCARE +SCARF +SCARP +SCARS +SCART +SCARY +SCAT +SCATS +SCATT +SCAUP +SCAUR +SCENA +SCEND +SCENE +SCENT +SCHAV +SCHMO +SCHUL +SCHWA +SCION +SCOFF +SCOLD +SCONE +SCOOP +SCOOT +SCOP +SCOPE +SCOPS +SCORE +SCORN +SCOT +SCOTS +SCOUR +SCOUT +SCOW +SCOWL +SCOWS +SCRAG +SCRAM +SCRAP +SCREE +SCREW +SCRIM +SCRIP +SCROD +SCRUB +SCRUM +SCRY +SCUBA +SCUD +SCUDI +SCUDO +SCUDS +SCUFF +SCULK +SCULL +SCULP +SCUM +SCUMS +SCUP +SCUPS +SCURF +SCUT +SCUTA +SCUTE +SCUTS +SEA +SEAL +SEALS +SEAM +SEAMS +SEAMY +SEAR +SEARS +SEAS +SEAT +SEATS +SEBUM +SEC +SECCO +SECS +SECT +SECTS +SEDAN +SEDER +SEDGE +SEDGY +SEDUM +SEE +SEED +SEEDS +SEEDY +SEEK +SEEKS +SEEL +SEELS +SEELY +SEEM +SEEMS +SEEN +SEEP +SEEPS +SEEPY +SEER +SEERS +SEES +SEG +SEGNI +SEGNO +SEGO +SEGOS +SEGS +SEGUE +SEI +SEIF +SEIFS +SEINE +SEIS +SEISE +SEISM +SEIZE +SEL +SELAH +SELF +SELFS +SELL +SELLE +SELLS +SELS +SELVA +SEME +SEMEN +SEMES +SEMI +SEMIS +SEN +SEND +SENDS +SENE +SENGI +SENNA +SENOR +SENSA +SENSE +SENT +SENTE +SENTI +SEPAL +SEPIA +SEPIC +SEPOY +SEPT +SEPTA +SEPTS +SER +SERA +SERAC +SERAI +SERAL +SERE +SERED +SERER +SERES +SERF +SERFS +SERGE +SERIF +SERIN +SEROW +SERRY +SERS +SERUM +SERVE +SERVO +SET +SETA +SETAE +SETAL +SETON +SETS +SETT +SETTS +SETUP +SEVEN +SEVER +SEW +SEWAN +SEWAR +SEWED +SEWER +SEWN +SEWS +SEX +SEXED +SEXES +SEXT +SEXTO +SEXTS +SEXY +SH +SHA +SHACK +SHAD +SHADE +SHADS +SHADY +SHAFT +SHAG +SHAGS +SHAH +SHAHS +SHAKE +SHAKO +SHAKY +SHALE +SHALL +SHALT +SHALY +SHAM +SHAME +SHAMS +SHANK +SHAPE +SHARD +SHARE +SHARK +SHARN +SHARP +SHAT +SHAUL +SHAVE +SHAW +SHAWL +SHAWM +SHAWN +SHAWS +SHAY +SHAYS +SHE +SHEA +SHEAF +SHEAL +SHEAR +SHEAS +SHED +SHEDS +SHEEN +SHEEP +SHEER +SHEET +SHEIK +SHELF +SHELL +SHEND +SHENT +SHEOL +SHERD +SHES +SHEW +SHEWN +SHEWS +SHH +SHIED +SHIEL +SHIER +SHIES +SHIFT +SHILL +SHILY +SHIM +SHIMS +SHIN +SHINE +SHINS +SHINY +SHIP +SHIPS +SHIRE +SHIRK +SHIRR +SHIRT +SHIST +SHIV +SHIVA +SHIVE +SHIVS +SHLEP +SHMO +SHOAL +SHOAT +SHOCK +SHOD +SHOE +SHOED +SHOER +SHOES +SHOG +SHOGS +SHOJI +SHONE +SHOO +SHOOK +SHOOL +SHOON +SHOOS +SHOOT +SHOP +SHOPS +SHORE +SHORL +SHORN +SHORT +SHOT +SHOTE +SHOTS +SHOTT +SHOUT +SHOVE +SHOW +SHOWN +SHOWS +SHOWY +SHOYU +SHRED +SHREW +SHRI +SHRIS +SHRUB +SHRUG +SHTIK +SHUCK +SHUL +SHULN +SHULS +SHUN +SHUNS +SHUNT +SHUSH +SHUT +SHUTE +SHUTS +SHY +SHYER +SHYLY +SI +SIAL +SIALS +SIB +SIBB +SIBBS +SIBS +SIBYL +SIC +SICE +SICES +SICK +SICKO +SICKS +SICS +SIDE +SIDED +SIDES +SIDLE +SIEGE +SIEUR +SIEVE +SIFT +SIFTS +SIGH +SIGHS +SIGHT +SIGIL +SIGMA +SIGN +SIGNS +SIKE +SIKER +SIKES +SILD +SILDS +SILEX +SILK +SILKS +SILKY +SILL +SILLS +SILLY +SILO +SILOS +SILT +SILTS +SILTY +SILVA +SIM +SIMA +SIMAR +SIMAS +SIMP +SIMPS +SIMS +SIN +SINCE +SINE +SINES +SINEW +SING +SINGE +SINGS +SINH +SINHS +SINK +SINKS +SINS +SINUS +SIP +SIPE +SIPED +SIPES +SIPS +SIR +SIRE +SIRED +SIREE +SIREN +SIRES +SIRRA +SIRS +SIRUP +SIS +SISAL +SISES +SISSY +SIT +SITAR +SITE +SITED +SITES +SITH +SITS +SITUP +SITUS +SIVER +SIX +SIXES +SIXMO +SIXTE +SIXTH +SIXTY +SIZAR +SIZE +SIZED +SIZER +SIZES +SIZY +SKA +SKAG +SKAGS +SKALD +SKAS +SKAT +SKATE +SKATS +SKEAN +SKEE +SKEED +SKEEN +SKEES +SKEET +SKEG +SKEGS +SKEIN +SKELM +SKELP +SKENE +SKEP +SKEPS +SKEW +SKEWS +SKI +SKID +SKIDS +SKIED +SKIER +SKIES +SKIEY +SKIFF +SKILL +SKIM +SKIMO +SKIMP +SKIMS +SKIN +SKINK +SKINS +SKINT +SKIP +SKIPS +SKIRL +SKIRR +SKIRT +SKIS +SKIT +SKITE +SKITS +SKIVE +SKOAL +SKOSH +SKUA +SKUAS +SKULK +SKULL +SKUNK +SKY +SKYED +SKYEY +SLAB +SLABS +SLACK +SLAG +SLAGS +SLAIN +SLAKE +SLAM +SLAMS +SLANG +SLANK +SLANT +SLAP +SLAPS +SLASH +SLAT +SLATE +SLATS +SLATY +SLAVE +SLAW +SLAWS +SLAY +SLAYS +SLED +SLEDS +SLEEK +SLEEP +SLEET +SLEPT +SLEW +SLEWS +SLICE +SLICK +SLID +SLIDE +SLIER +SLILY +SLIM +SLIME +SLIMS +SLIMY +SLING +SLINK +SLIP +SLIPE +SLIPS +SLIPT +SLIT +SLITS +SLOB +SLOBS +SLOE +SLOES +SLOG +SLOGS +SLOID +SLOJD +SLOOP +SLOP +SLOPE +SLOPS +SLOSH +SLOT +SLOTH +SLOTS +SLOW +SLOWS +SLOYD +SLUB +SLUBS +SLUE +SLUED +SLUES +SLUFF +SLUG +SLUGS +SLUM +SLUMP +SLUMS +SLUNG +SLUNK +SLUR +SLURB +SLURP +SLURS +SLUSH +SLUT +SLUTS +SLY +SLYER +SLYLY +SLYPE +SMACK +SMALL +SMALT +SMARM +SMART +SMASH +SMAZE +SMEAR +SMEEK +SMELL +SMELT +SMERK +SMEW +SMEWS +SMILE +SMIRK +SMIT +SMITE +SMITH +SMOCK +SMOG +SMOGS +SMOKE +SMOKY +SMOLT +SMOTE +SMUG +SMUT +SMUTS +SNACK +SNAFU +SNAG +SNAGS +SNAIL +SNAKE +SNAKY +SNAP +SNAPS +SNARE +SNARK +SNARL +SNASH +SNATH +SNAW +SNAWS +SNEAK +SNEAP +SNECK +SNED +SNEDS +SNEER +SNELL +SNIB +SNIBS +SNICK +SNIDE +SNIFF +SNIP +SNIPE +SNIPS +SNIT +SNITS +SNOB +SNOBS +SNOG +SNOGS +SNOOD +SNOOK +SNOOL +SNOOP +SNOOT +SNORE +SNORT +SNOT +SNOTS +SNOUT +SNOW +SNOWS +SNOWY +SNUB +SNUBS +SNUCK +SNUFF +SNUG +SNUGS +SNYE +SNYES +SO +SOAK +SOAKS +SOAP +SOAPS +SOAPY +SOAR +SOARS +SOAVE +SOB +SOBER +SOBS +SOCK +SOCKO +SOCKS +SOCLE +SOD +SODA +SODAS +SODDY +SODIC +SODOM +SODS +SOFA +SOFAR +SOFAS +SOFT +SOFTA +SOFTS +SOFTY +SOGGY +SOIL +SOILS +SOJA +SOJAS +SOKE +SOKES +SOKOL +SOL +SOLA +SOLAN +SOLAR +SOLD +SOLDI +SOLDO +SOLE +SOLED +SOLEI +SOLES +SOLI +SOLID +SOLO +SOLON +SOLOS +SOLS +SOLUM +SOLUS +SOLVE +SOMA +SOMAS +SOME +SON +SONAR +SONDE +SONE +SONES +SONG +SONGS +SONIC +SONLY +SONNY +SONS +SONSY +SOOEY +SOOK +SOOKS +SOON +SOOT +SOOTH +SOOTS +SOOTY +SOP +SOPH +SOPHS +SOPHY +SOPOR +SOPPY +SOPS +SORA +SORAS +SORB +SORBS +SORD +SORDS +SORE +SOREL +SORER +SORES +SORGO +SORI +SORN +SORNS +SORRY +SORT +SORTS +SORUS +SOS +SOT +SOTH +SOTHS +SOTOL +SOTS +SOU +SOUGH +SOUK +SOUKS +SOUL +SOULS +SOUND +SOUP +SOUPS +SOUPY +SOUR +SOURS +SOUS +SOUSE +SOUTH +SOW +SOWAR +SOWED +SOWER +SOWN +SOWS +SOX +SOY +SOYA +SOYAS +SOYS +SOYUZ +SOZIN +SPA +SPACE +SPACY +SPADE +SPADO +SPAE +SPAED +SPAES +SPAHI +SPAIL +SPAIT +SPAKE +SPALE +SPALL +SPAN +SPANG +SPANK +SPANS +SPAR +SPARE +SPARK +SPARS +SPAS +SPASM +SPAT +SPATE +SPATS +SPAWN +SPAY +SPAYS +SPAZ +SPEAK +SPEAN +SPEAR +SPEC +SPECK +SPECS +SPED +SPEED +SPEEL +SPEER +SPEIL +SPEIR +SPELL +SPELT +SPEND +SPENT +SPERM +SPEW +SPEWS +SPIC +SPICA +SPICE +SPICK +SPICS +SPICY +SPIED +SPIEL +SPIER +SPIES +SPIFF +SPIK +SPIKE +SPIKS +SPIKY +SPILE +SPILL +SPILT +SPIN +SPINE +SPINS +SPINY +SPIRE +SPIRT +SPIRY +SPIT +SPITE +SPITS +SPITZ +SPIV +SPIVS +SPLAT +SPLAY +SPLIT +SPODE +SPOIL +SPOKE +SPOOF +SPOOK +SPOOL +SPOON +SPOOR +SPORE +SPORT +SPOT +SPOTS +SPOUT +SPRAG +SPRAT +SPRAY +SPREE +SPRIG +SPRIT +SPRUE +SPRUG +SPRY +SPUD +SPUDS +SPUE +SPUED +SPUES +SPUME +SPUMY +SPUN +SPUNK +SPUR +SPURN +SPURS +SPURT +SPUTA +SPY +SQUAB +SQUAD +SQUAT +SQUAW +SQUEG +SQUIB +SQUID +SRI +SRIS +STAB +STABS +STACK +STADE +STAFF +STAG +STAGE +STAGS +STAGY +STAID +STAIG +STAIN +STAIR +STAKE +STALE +STALK +STALL +STAMP +STAND +STANE +STANG +STANK +STAPH +STAR +STARE +STARK +STARS +START +STASH +STAT +STATE +STATS +STAVE +STAW +STAY +STAYS +STEAD +STEAK +STEAL +STEAM +STEED +STEEK +STEEL +STEEP +STEER +STEIN +STELA +STELE +STEM +STEMS +STENO +STEP +STEPS +STERE +STERN +STET +STETS +STEW +STEWS +STEY +STICH +STICK +STIED +STIES +STIFF +STILE +STILL +STILT +STIME +STIMY +STING +STINK +STINT +STIPE +STIR +STIRK +STIRP +STIRS +STOA +STOAE +STOAI +STOAS +STOAT +STOB +STOBS +STOCK +STOGY +STOIC +STOKE +STOLE +STOMA +STOMP +STONE +STONY +STOOD +STOOK +STOOL +STOOP +STOP +STOPE +STOPS +STOPT +STORE +STORK +STORM +STORY +STOSS +STOUP +STOUR +STOUT +STOVE +STOW +STOWP +STOWS +STRAP +STRAW +STRAY +STREP +STREW +STRIA +STRIP +STROP +STROW +STROY +STRUM +STRUT +STUB +STUBS +STUCK +STUD +STUDS +STUDY +STUFF +STULL +STUM +STUMP +STUMS +STUN +STUNG +STUNK +STUNS +STUNT +STUPA +STUPE +STURT +STY +STYE +STYED +STYES +STYLE +STYLI +STYMY +SUAVE +SUB +SUBA +SUBAH +SUBAS +SUBER +SUBS +SUCH +SUCK +SUCKS +SUCRE +SUDD +SUDDS +SUDOR +SUDS +SUDSY +SUE +SUED +SUEDE +SUER +SUERS +SUES +SUET +SUETS +SUETY +SUGAR +SUGH +SUGHS +SUING +SUINT +SUIT +SUITE +SUITS +SULCI +SULFA +SULFO +SULK +SULKS +SULKY +SULLY +SULU +SULUS +SUM +SUMAC +SUMMA +SUMO +SUMOS +SUMP +SUMPS +SUMS +SUN +SUNG +SUNK +SUNN +SUNNA +SUNNS +SUNNY +SUNS +SUNUP +SUP +SUPE +SUPER +SUPES +SUPRA +SUPS +SUQ +SUQS +SURA +SURAH +SURAL +SURAS +SURD +SURDS +SURE +SURER +SURF +SURFS +SURFY +SURGE +SURGY +SURLY +SURRA +SUSHI +SUSS +SUTRA +SUTTA +SWAB +SWABS +SWAG +SWAGE +SWAGS +SWAIL +SWAIN +SWALE +SWAM +SWAMI +SWAMP +SWAMY +SWAN +SWANG +SWANK +SWANS +SWAP +SWAPS +SWARD +SWARE +SWARF +SWARM +SWART +SWASH +SWAT +SWATH +SWATS +SWAY +SWAYS +SWEAR +SWEAT +SWEDE +SWEEP +SWEER +SWEET +SWELL +SWEPT +SWIFT +SWIG +SWIGS +SWILL +SWIM +SWIMS +SWINE +SWING +SWINK +SWIPE +SWIRL +SWISH +SWISS +SWITH +SWIVE +SWOB +SWOBS +SWOON +SWOOP +SWOP +SWOPS +SWORD +SWORE +SWORN +SWOT +SWOTS +SWOUN +SWUM +SWUNG +SYBO +SYCE +SYCEE +SYCES +SYKE +SYKES +SYLI +SYLIS +SYLPH +SYLVA +SYN +SYNC +SYNCH +SYNCS +SYNE +SYNOD +SYNTH +SYPH +SYPHS +SYREN +SYRUP +SYSOP +TA +TAB +TABBY +TABER +TABES +TABID +TABLA +TABLE +TABOO +TABOR +TABS +TABU +TABUN +TABUS +TACE +TACES +TACET +TACH +TACHE +TACHS +TACIT +TACK +TACKS +TACKY +TACO +TACOS +TACT +TACTS +TAD +TADS +TAE +TAEL +TAELS +TAFFY +TAFIA +TAG +TAGS +TAHR +TAHRS +TAIGA +TAIL +TAILS +TAIN +TAINS +TAINT +TAJ +TAJES +TAKA +TAKE +TAKEN +TAKER +TAKES +TAKIN +TALA +TALAR +TALAS +TALC +TALCS +TALE +TALER +TALES +TALI +TALK +TALKS +TALKY +TALL +TALLY +TALON +TALUK +TALUS +TAM +TAMAL +TAME +TAMED +TAMER +TAMES +TAMIS +TAMMY +TAMP +TAMPS +TAMS +TAN +TANG +TANGO +TANGS +TANGY +TANK +TANKA +TANKS +TANS +TANSY +TANTO +TAO +TAOS +TAP +TAPA +TAPAS +TAPE +TAPED +TAPER +TAPES +TAPIR +TAPIS +TAPS +TAR +TARDO +TARDY +TARE +TARED +TARES +TARGE +TARN +TARNS +TARO +TAROC +TAROK +TAROS +TAROT +TARP +TARPS +TARRE +TARRY +TARS +TARSI +TART +TARTS +TARTY +TAS +TASK +TASKS +TASS +TASSE +TASTE +TASTY +TAT +TATAR +TATE +TATER +TATES +TATS +TATTY +TAU +TAUNT +TAUPE +TAUS +TAUT +TAUTS +TAV +TAVS +TAW +TAWED +TAWER +TAWIE +TAWNY +TAWS +TAWSE +TAX +TAXA +TAXED +TAXER +TAXES +TAXI +TAXIS +TAXON +TAXUS +TAZZA +TAZZE +TEA +TEACH +TEAK +TEAKS +TEAL +TEALS +TEAM +TEAMS +TEAR +TEARS +TEARY +TEAS +TEASE +TEAT +TEATS +TECHY +TECTA +TED +TEDDY +TEDS +TEE +TEED +TEEL +TEELS +TEEM +TEEMS +TEEN +TEENS +TEENY +TEES +TEETH +TEFF +TEFFS +TEG +TEGS +TEGUA +TEIID +TEIND +TEL +TELA +TELAE +TELE +TELES +TELEX +TELIA +TELIC +TELL +TELLS +TELLY +TELOI +TELOS +TELS +TEMP +TEMPI +TEMPO +TEMPS +TEMPT +TEN +TENCH +TEND +TENDS +TENET +TENIA +TENON +TENOR +TENS +TENSE +TENT +TENTH +TENTS +TENTY +TEPA +TEPAL +TEPAS +TEPEE +TEPID +TEPOY +TERAI +TERCE +TERGA +TERM +TERMS +TERN +TERNE +TERNS +TERRA +TERRY +TERSE +TESLA +TEST +TESTA +TESTS +TESTY +TET +TETH +TETHS +TETRA +TETS +TEUCH +TEUGH +TEW +TEWED +TEWS +TEXAS +TEXT +TEXTS +THACK +THAE +THAN +THANE +THANK +THARM +THAT +THAW +THAWS +THE +THEBE +THECA +THEE +THEFT +THEGN +THEIN +THEIR +THEM +THEME +THEN +THENS +THERE +THERM +THESE +THETA +THEW +THEWS +THEWY +THEY +THICK +THIEF +THIGH +THILL +THIN +THINE +THING +THINK +THINS +THIO +THIOL +THIR +THIRD +THIRL +THIS +THO +THOLE +THONG +THORN +THORO +THORP +THOSE +THOU +THOUS +THRAW +THREE +THREW +THRIP +THRO +THROB +THROE +THROW +THRU +THRUM +THUD +THUDS +THUG +THUGS +THUJA +THUMB +THUMP +THUNK +THURL +THUS +THUYA +THY +THYME +THYMI +THYMY +TI +TIARA +TIBIA +TIC +TICAL +TICK +TICKS +TICS +TIDAL +TIDE +TIDED +TIDES +TIDY +TIE +TIED +TIER +TIERS +TIES +TIFF +TIFFS +TIGER +TIGHT +TIGON +TIKE +TIKES +TIKI +TIKIS +TIL +TILAK +TILDE +TILE +TILED +TILER +TILES +TILL +TILLS +TILS +TILT +TILTH +TILTS +TIME +TIMED +TIMER +TIMES +TIMID +TIN +TINCT +TINE +TINEA +TINED +TINES +TING +TINGE +TINGS +TINNY +TINS +TINT +TINTS +TINY +TIP +TIPI +TIPIS +TIPPY +TIPS +TIPSY +TIRE +TIRED +TIRES +TIRL +TIRLS +TIRO +TIROS +TIS +TIT +TITAN +TITER +TITHE +TITI +TITIS +TITLE +TITRE +TITS +TITTY +TIVY +TIZZY +TO +TOAD +TOADS +TOADY +TOAST +TOBY +TOD +TODAY +TODDY +TODS +TODY +TOE +TOEA +TOED +TOES +TOFF +TOFFS +TOFFY +TOFT +TOFTS +TOFU +TOFUS +TOG +TOGA +TOGAE +TOGAS +TOGS +TOGUE +TOIL +TOILE +TOILS +TOIT +TOITS +TOKAY +TOKE +TOKED +TOKEN +TOKER +TOKES +TOLA +TOLAN +TOLAS +TOLD +TOLE +TOLED +TOLES +TOLL +TOLLS +TOLU +TOLUS +TOLYL +TOM +TOMAN +TOMB +TOMBS +TOME +TOMES +TOMMY +TOMS +TON +TONAL +TONDI +TONDO +TONE +TONED +TONER +TONES +TONEY +TONG +TONGA +TONGS +TONIC +TONNE +TONS +TONUS +TONY +TOO +TOOK +TOOL +TOOLS +TOOM +TOON +TOONS +TOOT +TOOTH +TOOTS +TOP +TOPAZ +TOPE +TOPED +TOPEE +TOPER +TOPES +TOPH +TOPHE +TOPHI +TOPHS +TOPI +TOPIC +TOPIS +TOPOI +TOPOS +TOPS +TOQUE +TOR +TORA +TORAH +TORAS +TORC +TORCH +TORCS +TORE +TORES +TORI +TORIC +TORII +TORN +TORO +TOROS +TOROT +TORR +TORS +TORSE +TORSI +TORSK +TORSO +TORT +TORTE +TORTS +TORUS +TORY +TOSH +TOSS +TOST +TOT +TOTAL +TOTE +TOTED +TOTEM +TOTER +TOTES +TOTS +TOUCH +TOUGH +TOUR +TOURS +TOUSE +TOUT +TOUTS +TOW +TOWED +TOWEL +TOWER +TOWIE +TOWN +TOWNS +TOWNY +TOWS +TOWY +TOXIC +TOXIN +TOY +TOYED +TOYER +TOYO +TOYON +TOYOS +TOYS +TRACE +TRACK +TRACT +TRAD +TRADE +TRAGI +TRAIK +TRAIL +TRAIN +TRAIT +TRAM +TRAMP +TRAMS +TRANK +TRANQ +TRANS +TRAP +TRAPS +TRAPT +TRASH +TRASS +TRAVE +TRAWL +TRAY +TRAYS +TREAD +TREAT +TREE +TREED +TREEN +TREES +TREF +TREK +TREKS +TREND +TRESS +TRET +TRETS +TREWS +TREY +TREYS +TRIAC +TRIAD +TRIAL +TRIBE +TRICE +TRICK +TRIED +TRIER +TRIES +TRIG +TRIGO +TRIGS +TRIKE +TRILL +TRIM +TRIMS +TRINE +TRIO +TRIOL +TRIOS +TRIP +TRIPE +TRIPS +TRITE +TROAK +TROCK +TROD +TRODE +TROIS +TROKE +TROLL +TROMP +TRONA +TRONE +TROOP +TROOZ +TROP +TROPE +TROT +TROTH +TROTS +TROUT +TROVE +TROW +TROWS +TROY +TROYS +TRUCE +TRUCK +TRUE +TRUED +TRUER +TRUES +TRUG +TRUGS +TRULL +TRULY +TRUMP +TRUNK +TRUSS +TRUST +TRUTH +TRY +TRYMA +TRYST +TSADE +TSADI +TSAR +TSARS +TSK +TSKED +TSKS +TSUBA +TUB +TUBA +TUBAE +TUBAL +TUBAS +TUBBY +TUBE +TUBED +TUBER +TUBES +TUBS +TUCK +TUCKS +TUFA +TUFAS +TUFF +TUFFS +TUFT +TUFTS +TUFTY +TUG +TUGS +TUI +TUIS +TULE +TULES +TULIP +TULLE +TUMID +TUMMY +TUMOR +TUMP +TUMPS +TUN +TUNA +TUNAS +TUNE +TUNED +TUNER +TUNES +TUNG +TUNGS +TUNIC +TUNNY +TUNS +TUP +TUPIK +TUPS +TUQUE +TURBO +TURD +TURDS +TURF +TURFS +TURFY +TURK +TURKS +TURN +TURNS +TURPS +TUSH +TUSHY +TUSK +TUSKS +TUT +TUTEE +TUTOR +TUTS +TUTTI +TUTTY +TUTU +TUTUS +TUX +TUXES +TUYER +TWA +TWAE +TWAES +TWAIN +TWANG +TWAS +TWAT +TWATS +TWEAK +TWEE +TWEED +TWEEN +TWEET +TWERP +TWICE +TWIER +TWIG +TWIGS +TWILL +TWIN +TWINE +TWINS +TWINY +TWIRL +TWIRP +TWIST +TWIT +TWITS +TWIXT +TWO +TWOS +TWYER +TYE +TYEE +TYEES +TYER +TYERS +TYES +TYING +TYKE +TYKES +TYNE +TYNED +TYNES +TYPAL +TYPE +TYPED +TYPES +TYPEY +TYPIC +TYPO +TYPOS +TYPP +TYPPS +TYPY +TYRE +TYRED +TYRES +TYRO +TYROS +TYTHE +TZAR +TZARS +UDDER +UDO +UDOS +UGH +UGHS +UGLY +UH +UHLAN +UKASE +UKE +UKES +ULAMA +ULAN +ULANS +ULCER +ULEMA +ULNA +ULNAD +ULNAE +ULNAR +ULNAS +ULPAN +ULTRA +ULU +ULUS +ULVA +ULVAS +UM +UMBEL +UMBER +UMBO +UMBOS +UMBRA +UMIAC +UMIAK +UMIAQ +UMM +UMP +UMPED +UMPS +UN +UNAI +UNAIS +UNAPT +UNARM +UNARY +UNAU +UNAUS +UNBAN +UNBAR +UNBE +UNBID +UNBOX +UNCAP +UNCI +UNCIA +UNCLE +UNCO +UNCOS +UNCOY +UNCUS +UNCUT +UNDE +UNDEE +UNDER +UNDID +UNDO +UNDUE +UNDY +UNFED +UNFIT +UNFIX +UNGOT +UNHAT +UNHIP +UNIFY +UNION +UNIT +UNITE +UNITS +UNITY +UNLAY +UNLED +UNLET +UNLIT +UNMAN +UNMET +UNMEW +UNMIX +UNPEG +UNPEN +UNPIN +UNRIG +UNRIP +UNS +UNSAY +UNSET +UNSEW +UNSEX +UNTIE +UNTIL +UNTO +UNWED +UNWIT +UNWON +UNZIP +UP +UPAS +UPBOW +UPBY +UPBYE +UPDO +UPDOS +UPDRY +UPEND +UPLIT +UPO +UPON +UPPED +UPPER +UPS +UPSET +URAEI +URARE +URARI +URASE +URATE +URB +URBAN +URBIA +URBS +URD +URDS +UREA +UREAL +UREAS +UREDO +UREIC +URGE +URGED +URGER +URGES +URIAL +URIC +URINE +URN +URNS +URSA +URSAE +URUS +US +USAGE +USE +USED +USER +USERS +USES +USHER +USING +USNEA +USQUE +USUAL +USURP +USURY +UT +UTA +UTAS +UTERI +UTILE +UTS +UTTER +UVEA +UVEAL +UVEAS +UVULA +VAC +VACS +VACUA +VAGAL +VAGI +VAGUE +VAGUS +VAIL +VAILS +VAIN +VAIR +VAIRS +VAKIL +VALE +VALES +VALET +VALID +VALOR +VALSE +VALUE +VALVE +VAMP +VAMPS +VAN +VANDA +VANE +VANED +VANES +VANG +VANGS +VANS +VAPID +VAPOR +VAR +VARA +VARAS +VARIA +VARIX +VARNA +VARS +VARUS +VARVE +VARY +VAS +VASA +VASAL +VASE +VASES +VAST +VASTS +VASTY +VAT +VATIC +VATS +VATU +VATUS +VAU +VAULT +VAUNT +VAUS +VAV +VAVS +VAW +VAWS +VEAL +VEALS +VEALY +VEE +VEENA +VEEP +VEEPS +VEER +VEERS +VEERY +VEES +VEG +VEGAN +VEGIE +VEIL +VEILS +VEIN +VEINS +VEINY +VELA +VELAR +VELD +VELDS +VELDT +VELUM +VENA +VENAE +VENAL +VEND +VENDS +VENGE +VENIN +VENOM +VENT +VENTS +VENUE +VERA +VERB +VERBS +VERGE +VERSE +VERSO +VERST +VERT +VERTS +VERTU +VERVE +VERY +VEST +VESTA +VESTS +VET +VETCH +VETO +VETS +VEX +VEXED +VEXER +VEXES +VEXIL +VEXT +VIA +VIAL +VIALS +VIAND +VIBE +VIBES +VICAR +VICE +VICED +VICES +VICHY +VIDE +VIDEO +VIE +VIED +VIER +VIERS +VIES +VIEW +VIEWS +VIEWY +VIG +VIGA +VIGAS +VIGIL +VIGOR +VIGS +VILE +VILER +VILL +VILLA +VILLI +VILLS +VIM +VIMEN +VIMS +VINA +VINAL +VINAS +VINCA +VINE +VINED +VINES +VINIC +VINO +VINOS +VINY +VINYL +VIOL +VIOLA +VIOLS +VIPER +VIRAL +VIREO +VIRES +VIRGA +VIRID +VIRL +VIRLS +VIRTU +VIRUS +VIS +VISA +VISAS +VISE +VISED +VISES +VISIT +VISOR +VISTA +VITA +VITAE +VITAL +VITTA +VIVA +VIVAS +VIVE +VIVID +VIXEN +VIZIR +VIZOR +VOCAL +VOCES +VODKA +VODUN +VOE +VOES +VOGIE +VOGUE +VOICE +VOID +VOIDS +VOILA +VOILE +VOLAR +VOLE +VOLED +VOLES +VOLT +VOLTA +VOLTE +VOLTI +VOLTS +VOLVA +VOMER +VOMIT +VOTE +VOTED +VOTER +VOTES +VOUCH +VOW +VOWED +VOWEL +VOWER +VOWS +VOX +VROOM +VROUW +VROW +VROWS +VUG +VUGG +VUGGS +VUGGY +VUGH +VUGHS +VUGS +VULGO +VULVA +VYING +WAB +WABS +WACK +WACKE +WACKO +WACKS +WACKY +WAD +WADDY +WADE +WADED +WADER +WADES +WADI +WADIS +WADS +WADY +WAE +WAES +WAFER +WAFF +WAFFS +WAFT +WAFTS +WAG +WAGE +WAGED +WAGER +WAGES +WAGON +WAGS +WAHOO +WAIF +WAIFS +WAIL +WAILS +WAIN +WAINS +WAIR +WAIRS +WAIST +WAIT +WAITS +WAIVE +WAKE +WAKED +WAKEN +WAKER +WAKES +WALE +WALED +WALER +WALES +WALK +WALKS +WALL +WALLA +WALLS +WALLY +WALTZ +WALY +WAME +WAMES +WAMUS +WAN +WAND +WANDS +WANE +WANED +WANES +WANEY +WANLY +WANS +WANT +WANTS +WANY +WAP +WAPS +WAR +WARD +WARDS +WARE +WARED +WARES +WARK +WARKS +WARM +WARMS +WARN +WARNS +WARP +WARPS +WARS +WART +WARTS +WARTY +WARY +WAS +WASH +WASHY +WASP +WASPS +WASPY +WAST +WASTE +WASTS +WAT +WATAP +WATCH +WATER +WATS +WATT +WATTS +WAUGH +WAUK +WAUKS +WAUL +WAULS +WAUR +WAVE +WAVED +WAVER +WAVES +WAVEY +WAVY +WAW +WAWL +WAWLS +WAWS +WAX +WAXED +WAXEN +WAXER +WAXES +WAXY +WAY +WAYS +WE +WEAK +WEAL +WEALD +WEALS +WEAN +WEANS +WEAR +WEARS +WEARY +WEAVE +WEB +WEBBY +WEBER +WEBS +WECHT +WED +WEDEL +WEDGE +WEDGY +WEDS +WEE +WEED +WEEDS +WEEDY +WEEK +WEEKS +WEEL +WEEN +WEENS +WEENY +WEEP +WEEPS +WEEPY +WEER +WEES +WEEST +WEET +WEETS +WEFT +WEFTS +WEIGH +WEIR +WEIRD +WEIRS +WEKA +WEKAS +WELCH +WELD +WELDS +WELL +WELLS +WELLY +WELSH +WELT +WELTS +WEN +WENCH +WEND +WENDS +WENNY +WENS +WENT +WEPT +WERE +WERT +WEST +WESTS +WET +WETLY +WETS +WHA +WHACK +WHALE +WHAM +WHAMO +WHAMS +WHANG +WHAP +WHAPS +WHARF +WHAT +WHATS +WHAUP +WHEAL +WHEAT +WHEE +WHEEL +WHEEN +WHEEP +WHELK +WHELM +WHELP +WHEN +WHENS +WHERE +WHET +WHETS +WHEW +WHEWS +WHEY +WHEYS +WHICH +WHID +WHIDS +WHIFF +WHIG +WHIGS +WHILE +WHIM +WHIMS +WHIN +WHINE +WHINS +WHINY +WHIP +WHIPS +WHIPT +WHIR +WHIRL +WHIRR +WHIRS +WHISH +WHISK +WHIST +WHIT +WHITE +WHITS +WHITY +WHIZ +WHIZZ +WHO +WHOA +WHOLE +WHOM +WHOMP +WHOOF +WHOOP +WHOP +WHOPS +WHORE +WHORL +WHORT +WHOSE +WHOSO +WHUMP +WHY +WHYS +WICH +WICK +WICKS +WIDDY +WIDE +WIDEN +WIDER +WIDES +WIDOW +WIDTH +WIELD +WIFE +WIFED +WIFES +WIFTY +WIG +WIGAN +WIGGY +WIGHT +WIGS +WILCO +WILD +WILDS +WILE +WILED +WILES +WILL +WILLS +WILLY +WILT +WILTS +WILY +WIMP +WIMPS +WIMPY +WIN +WINCE +WINCH +WIND +WINDS +WINDY +WINE +WINED +WINES +WINEY +WING +WINGS +WINGY +WINK +WINKS +WINO +WINOS +WINS +WINY +WINZE +WIPE +WIPED +WIPER +WIPES +WIRE +WIRED +WIRER +WIRES +WIRRA +WIRY +WIS +WISE +WISED +WISER +WISES +WISH +WISHA +WISP +WISPS +WISPY +WISS +WIST +WISTS +WIT +WITAN +WITCH +WITE +WITED +WITES +WITH +WITHE +WITHY +WITS +WITTY +WIVE +WIVED +WIVER +WIVES +WIZ +WIZEN +WIZES +WO +WOAD +WOADS +WOALD +WODGE +WOE +WOES +WOFUL +WOG +WOGS +WOK +WOKE +WOKEN +WOKS +WOLD +WOLDS +WOLF +WOLFS +WOMAN +WOMB +WOMBS +WOMBY +WOMEN +WON +WONK +WONKS +WONKY +WONS +WONT +WONTS +WOO +WOOD +WOODS +WOODY +WOOED +WOOER +WOOF +WOOFS +WOOL +WOOLS +WOOLY +WOOPS +WOOS +WOOSH +WOOZY +WOP +WOPS +WORD +WORDS +WORDY +WORE +WORK +WORKS +WORLD +WORM +WORMS +WORMY +WORN +WORRY +WORSE +WORST +WORT +WORTH +WORTS +WOS +WOST +WOT +WOTS +WOULD +WOUND +WOVE +WOVEN +WOW +WOWED +WOWS +WRACK +WRANG +WRAP +WRAPS +WRAPT +WRATH +WREAK +WRECK +WREN +WRENS +WREST +WRICK +WRIED +WRIER +WRIES +WRING +WRIST +WRIT +WRITE +WRITS +WRONG +WROTE +WROTH +WRUNG +WRY +WRYER +WRYLY +WUD +WURST +WUSS +WUSSY +WYCH +WYE +WYES +WYLE +WYLED +WYLES +WYN +WYND +WYNDS +WYNN +WYNNS +WYNS +WYTE +WYTED +WYTES +XEBEC +XENIA +XENIC +XENON +XERIC +XEROX +XERUS +XI +XIS +XU +XYLAN +XYLEM +XYLOL +XYLYL +XYST +XYSTI +XYSTS +YA +YACHT +YACK +YACKS +YAFF +YAFFS +YAGER +YAGI +YAGIS +YAH +YAHOO +YAIRD +YAK +YAKS +YALD +YAM +YAMEN +YAMS +YAMUN +YANG +YANGS +YANK +YANKS +YAP +YAPOK +YAPON +YAPS +YAR +YARD +YARDS +YARE +YARER +YARN +YARNS +YAUD +YAUDS +YAULD +YAUP +YAUPS +YAW +YAWED +YAWL +YAWLS +YAWN +YAWNS +YAWP +YAWPS +YAWS +YAY +YAYS +YE +YEA +YEAH +YEAN +YEANS +YEAR +YEARN +YEARS +YEAS +YEAST +YECCH +YECH +YECHS +YECHY +YEGG +YEGGS +YEH +YELD +YELK +YELKS +YELL +YELLS +YELP +YELPS +YEN +YENS +YENTA +YENTE +YEP +YERBA +YERK +YERKS +YES +YESES +YET +YETI +YETIS +YETT +YETTS +YEUK +YEUKS +YEUKY +YEW +YEWS +YID +YIDS +YIELD +YIKES +YILL +YILLS +YIN +YINCE +YINS +YIP +YIPE +YIPES +YIPS +YIRD +YIRDS +YIRR +YIRRS +YIRTH +YLEM +YLEMS +YO +YOB +YOBBO +YOBS +YOCK +YOCKS +YOD +YODEL +YODH +YODHS +YODLE +YODS +YOGA +YOGAS +YOGEE +YOGH +YOGHS +YOGI +YOGIC +YOGIN +YOGIS +YOK +YOKE +YOKED +YOKEL +YOKES +YOKS +YOLK +YOLKS +YOLKY +YOM +YOMIM +YON +YOND +YONI +YONIC +YONIS +YORE +YORES +YOU +YOUNG +YOUR +YOURN +YOURS +YOUSE +YOUTH +YOW +YOWE +YOWED +YOWES +YOWIE +YOWL +YOWLS +YOWS +YUAN +YUANS +YUCA +YUCAS +YUCCA +YUCCH +YUCH +YUCK +YUCKS +YUCKY +YUGA +YUGAS +YUK +YUKS +YULAN +YULE +YULES +YUM +YUMMY +YUP +YUPON +YUPS +YURT +YURTA +YURTS +YWIS +ZAG +ZAGS +ZAIRE +ZAMIA +ZANY +ZANZA +ZAP +ZAPPY +ZAPS +ZARF +ZARFS +ZAX +ZAXES +ZAYIN +ZAZEN +ZEAL +ZEALS +ZEBEC +ZEBRA +ZEBU +ZEBUS +ZED +ZEDS +ZEE +ZEES +ZEIN +ZEINS +ZEK +ZEKS +ZEN +ZERK +ZERKS +ZERO +ZEROS +ZEST +ZESTS +ZESTY +ZETA +ZETAS +ZIBET +ZIG +ZIGS +ZILCH +ZILL +ZILLS +ZIN +ZINC +ZINCS +ZINCY +ZINEB +ZING +ZINGS +ZINGY +ZINKY +ZINS +ZIP +ZIPPY +ZIPS +ZIRAM +ZIT +ZITI +ZITIS +ZITS +ZIZIT +ZLOTE +ZLOTY +ZOA +ZOEA +ZOEAE +ZOEAL +ZOEAS +ZOIC +ZOMBI +ZONAL +ZONE +ZONED +ZONER +ZONES +ZONK +ZONKS +ZOO +ZOOID +ZOOKS +ZOOM +ZOOMS +ZOON +ZOONS +ZOOS +ZOOTY +ZORI +ZORIL +ZORIS +ZOWIE +ZYME +ZYMES