Chapter 2 of 9
From an idea to a working program
Suppose you'd like a scorekeeper for a game at your kitchen table. “Make me a scorekeeper” leaves ChatGPT to invent the rules. Pick two keys and write down what you expect them to do. Now you have both a request and a way to judge the first answer.
Describe a turn you could play
In a separate practice BASIC draft with review access, try the request below. Starting a practice draft and connecting it are covered in Chapter 1. You can also use this as a pattern when you design the capitals quiz.
Make a small CoCo 3 Disk BASIC scorekeeper in this draft. Start at zero. Show which key to press. The 1 key adds one point. The 2 key prints FINAL SCORE followed by the total, then ends. Other keys leave the total alone. Read one key at a time. Propose the numbered listing in VCC Plus and wait for my review.
Prediction. If you send 1, 1, 0, then 2, the final score should be 2. Jot down that prediction before you read the proposed solution. It gives you a test that stays the same even if the program changes.
If you want to understand the keyboard routine, ask for a reference while you work.
Search the installed VCC Plus manuals for INKEY$. Read a matching BASIC section. Give me the book and section title and explain what the program gets when nobody is pressing a key.
All three workspaces can search the installed manuals. ChatGPT can use search_help to find a section and read_topic to read it. You can follow the answer in Help → Manual Library… with Ask the Manuals. For this program, an empty string means no key is waiting. Polling again keeps the scorekeeper ready for your next turn.
VCC Plus also has a separate read-only MCP connection for historical publications. Open Help → Archive Library…, select the link button, choose Save Archive Search Connection…, then Add to ChatGPT. In a new Work chat, try “Search the Color Computer Archive for a BASIC manual page about INKEY$. Give me the manual title, the physical PDF page and the original Archive link so I can check it.” You can open that page in the Archive Library and compare its explanation with the behavior of your scorekeeper.
If the reader offers Copy Snippet or Open in BASIC Editor, it has a reviewed listing associated with that page. Keep its citation when discussing or adapting the example. Opening a BASIC listing creates a separate editable copy; inspect it before choosing Run. A photographed program or an OCR search hit does not by itself promise corrected, runnable source. The handbook's Archive reader walkthrough explains the page, citation and listing controls. The Archive connection remains read-only; use your separate development connection to propose project edits.
When you are researching software already in Software Library, look for Guides & References in its details. A reviewed walkthrough, map or tutorial opens directly at its Archive document/page. These links supplement the main manual; they do not assert that every title has been researched exhaustively. Keep the historical citation when it informs your project. Both libraries resume their browsing/reading contexts, and the Manual Library's Bookmarks list can keep useful native-book and toolchain-reference sections together. Those personal reading choices do not add MCP permissions or expose your private library.
Read the change before you play
Look at the proposal in VCC Plus. For a whole BASIC listing, check the first and last lines and then follow the short path that matters. Where does the score start? Which line adds one? What takes the player back to the key check after an invalid choice? Ask ChatGPT to point out the numbered lines if you'd like help reading them. Choose Apply Edit when the proposal matches the game. A code block posted in the chat still needs to be proposed through the connection before you can review it in the app.
For a C or assembly project, you can make the same request in smaller pieces. Tell ChatGPT which existing files to change. Read the proposed changes together, apply them, then ask it to build the new revision. The compiler or assembler can catch a misspelling before you even start the CoCo. A successful build is your cue to try the game.
Start the CoCo and watch one turn
Ask ChatGPT, “Check the machine status for this draft. Tell me whether I can run it and name any blocker you find.” Use a disposable Disk BASIC session. Save anything you want to keep before replacing a guest program. If the app reports writable media, protect or eject the disk after saving your work. Eject the starter cassette, finish any recording or Mac shell session and turn off DriveWire networking if the readiness check calls for it. The CoCo should be running at its supported BASIC prompt. Chapter 8 explains how to read a refusal.
Choose Run for the applied BASIC proposal in VCC Plus. For C and assembly, start the current build from the shared project as described in Chapters 4 and 5. Back in ChatGPT, ask for this test.
Use the run I just started. Read its CoCo text screen. Send 1, 1, 0, then 2 through the VCC Plus game controls, one key per call. After each key wait for the program to accept it before continuing. Quote the final score from the CoCo. Tell me whether it agrees with my prediction of 2.
A choice game is easiest to test when it shows that it heard each key. Perhaps you see the updated total after a point and a short reminder after an invalid choice. If a screen stays the same, ask what the assistant actually observed. Avoid repeating a key until you know what happened. You can request visible feedback as a refinement.
Change one rule and keep the evidence
Suppose the score is right but your first-time player doesn't know how to quit. Try, “Add a line at startup that says PRESS 2 TO FINISH. Keep the rules and the scoring the same. Propose the smallest change that does that.” Read the change in VCC Plus and run the same four keys again. Test an immediate 2 in a separate run as well. The total should be zero.
Save the source you want to keep from the native editor or project. Keep a short text note beside it. This pattern works for a ten-line game as well as a larger project.
| Write down | What to put there |
|---|---|
| First request | The words you gave the model, the language and the target CoCo. |
| First attempt | Whether the first proposal was accepted, whether it built if needed, and what appeared on the first run. |
| A failed check | The exact input and the observed screen line or compiler diagnostic. |
| Refinement | What you asked for next, what changed, and which version you tested. |
| Working copy | The saved filename, target processor where relevant, and the last test someone else can repeat. |
If the first run failed, keep that entry even after a repair succeeds. It answers a different question from whether the final game works. For a worked example with three first drafts and three recorded playtests, turn to the capitals quiz.