Enticed by
a post on Hacker News, I've just finished reading
Microchess for the Kim-1, a very engaging March, 2006 retrospective written by MicroChess author
Peter Jennings.
Microchess for the Kim-1 was the first game program sold for home computers. After six months of development, the first copy was shipped on December 18, 1976. (And about three years later, it was Jennings who, along with VisiCorp co-founder Dan Fylstra, released the historic "killer application"
VisiCalc, the first spreadsheet computer program for personal computers.
)
"I knew from the articles in Byte that the 8080 was capable of real computing, but I didn't know about the 6502. In order to satisfy my curiosity about the capabilities of both chips, and having access to a Xerox Sigma IX Time Sharing computer at work, I wrote a simulator for each chip. There is nothing like writing a simulator to focus the mind on understanding the instruction sets for the two chips. The simulators were written in APL. At the end of this exercise I was firmly convinced that I would much rather program a 6502 than an 8080. [...]
"A well written program is a work of art. From conception to final presentation, the activity is that of an artist - the embodiment of a dream world expressed as an interactive experience for the user.
"This is the way I have always felt about programming. And in particular, from its early stages, I thought of Microchess as my work of art.
"But the creation of Microchess was also the fulfillment of another dream. I very much wanted to start a business of my own. Because of the lower financial barriers to entry, I knew that it would probably be a mail order business. [...]
"One day, I asked [MOS Technology's Rick Simpson] if he would allow me to insert advertising flyers in the Kim-1 packages they shipped. He discussed it with management, and the company agreed. From then on, every Kim-1 shipped contained a goldenrod colored flyer advertising Microchess. One out of every three purchasers of the Kim-1 ordered Microchess on cassette.
"At the time, I was still working for Comshare during the day and filling orders for Microchess at night. We had just moved from our apartment to a small house in downtown Toronto when the news of Microchess reached the installed base of Kim-1 owners. I arrived home from work to find two large canvas bags marked “Canada Post” on our front doorstep. I didn't understand. Why had our letter carrier left his bags there? It seemed very odd."
For a look at the source code, see
MicroChess by Peter Jennings, modified by Daryl Rictor here on 6502.org. According to Jennings, "After a lot of trial and error and some rigorous analysis, I settled on a state machine design, which allowed the use of recursion to work through the advancing positions as moves were generated and evaluated. A move stack allowed the retracing of moves back to the original position."
And should you wish experience the power of MicroChess on a KIM-1 with
1K of RAM the article includes links to simulators that run on 21st Century hardware!
-- Jeff
_________________
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html