Here are the current submissions for the 1980 4K Programming Challenge. Each entry must be able to run on the original 1980 4K Radio Shack TRS-80 Color Computer using only cassette recorder for storage. I plan to go in and sort the entries by name, rather than group them by the author, but for now, the list is just sorted by the author’s last name.
- 2015/02/06 Update: Added Simon Jonassen’s 4K demos!
- 2015/02/13: Added Bob Swoger’s “Who is the greatest?” and Swoger/Mobley’s “Radio Horizon”.
Jim Gerrie (Canada)
Jim Gerrie has been submitting a variety of programs, some original designed to run on the 4K Radio Shack MC-10. A few have had to be tweaked to work on the 4K CoCo since it provides less RAM to BASIC than the MC-10.
NEW: Night Blitz is an airplane game, reminiscent of Atari 2600’s Air Combat.
NEW: Asteroid Storm is sort of like Frogger or, better, Activision’s Freeway. Meteors roll up the screen, and you have to navigate your spacsehip (arrow) from the right side of the screen to the left… And there’s no backing up!
Farfall is a text-mode game based on John Linville’s Fahrfall.
JimVaders is a text-mode Space Invaders style game, complete with a stationary mother ship that makes an appearance, and a few beeps along the way.
Lander is a rather fancy version of the classic Lunar Lander done with the 64×32 block graphics.
Tetris is a version of the classic falling block game. It was too large to fit in 4K, so it is loaded in two chunks from two cassette files. Clever :)
G2048 is a 4K version of the current hit 2048 game (web-based and iPhone/Android). The original game is open source, and Jim used that as reference to make it play like the original.
Simon Jonassen (Denmark)
Simon has been cranking out some very interesting video and audio demos on the old CoCo 1/2s, and has decided to see what he can do to make them fit on a 4K machine. He has been working on a multi-part 4K demo.
Rogelio submits two entries — a maddening puzzle game, and a math type entry. He writes:
FROGS is a game of logic, did this one years ago first on a CoCo 3 based on a TRS-80 Model I/III BASIC program from a RS sold book. had a couple of ECB embellishments that got stripped out for Color Basic, found out that some things I have done on the original conversions could be simplified so I did. Plot here is to move all the blocks on the left (the donuts) into the right and the ones on the right to the left, the trick is to do it in 24 moves, the program will let you know upon finishing the swap either by congratulating the player or letting him/her know how many moves to take out to get perfect score. Illegal moves do not count and pressing F at either slot move prompt will forfeit the game and start over again.
SPIRALS is also another adaptation from a Graphics book for the Model I/III. Did the port first for the MC-10 years ago and moving it to Color Basic was more or less straightforward short of the lack of COSine on CB… back to the manual for the old derived functions listings on stuff I should have learned better in school. Enter an angle value and either plot to lines or points, that’s all. There are a few interesting designs: with lines try 87, 90 & 122 degrees, with points try 61 & 170 degrees. I am still working on getting this particular program do its graphics on the 64×64 mode (unsupported by CB *and* ECB but achievable through POKEs), still on the works – will let you know.
Nick Marentes (Australia)
Space Invaders on a 4K Color Basic CoCo? Is it possible to replicate the tension and excitement of the arcade original?
With just over 2K of free RAM to start with and a BASIC that doesn’t even allow editing of it’s own lines, it seemed doubtful that anything decent was possible under such constraints.
The challenge was set! An opportunity to relive those early computing days when BASIC programming was cool and large colored pixels were cutting edge! I set forth using techniques such as multi-statement lines, embedded graphics, self modifying BASIC code and a total disregard for structured programming!
This is my attempt to squeeze a piece of arcade history into a limited programming environment and show what can be accomplished using standard 4K Color Basic (no machine language).
Let the invasion begin!
John Mark Mobley
Glenside CoCo Club’s John Mark Mobley contributes an interesting entry that solves the Magic Square puzzle in 4K.
The wikipedia states: “In recreational mathematics, a magic square is an arrangement of distinct numbers (i.e. each number is used once), usually integers, in a square grid, where the numbers in each row, and in each column, and the numbers in the main and secondary diagonals, all add up to the same number.”
To make this possible, it actually loads in three different parts in series. Clever (and totally doable in 1980, per the rules). John Mark Mobley writes:
“This program is an automatic magic square puzzle solver. It solves a 3×3 magic square. It finds all 8 solutions. It generates a permutation of 9 taken 9 at a time and tests each permutation for a magic square match. There are 362,880 permutations.
My program is divided into 3 parts:
1) MAGICSQR Introduction
2) MAGICSQ2 Analysis
3) MAGICSQ3 Print Results.
The analysis takes about 12 hours.“
(I will have to let it run overnight to see it for myself…)
John shared this story about the program’s creation:
My first attempt to write a permutation generator was to assign a seating chart for a class room of 40 students.
The idea was to have a computer do a permutation of 40 taken 40 at a time, and then test each permutation for a good fit. A good fit would separate friends that talk if too close, and enemies that fight if to close.
I gave up trying to write the program because the number of permutations was too grate.
The number of permutations = 40! = 40*39*38*37*…5*4*3*2 = 8.1591528324789773434561126959612e+47.
Let’s suppose that a 8 core processor running at 10GHz can solve 80,000,000,000 permutations per second. Which is 8e10*60*60*24*365 = 2522880000000000000 permutations per year. Now let’s take 1000 computers that gives us 2522880000000000000000 permutations per year. So now it will take 1000 computers 323406298852064994904875091.00556 years to solve the problem, but by that time the students will have already graduated from high school.
It took my wife (the school teacher) only 30 minutes to come up with a seating chart.
So a permutation generator is not always a good approach to solving problems.
So I started looking for another problem that I could use a permutation generator to solve, and I came up with the magic square.
Gotta love it!
Who’s the greatest?
It is designed to show how the string compare functions/operators work. The program will have you input 2 strings and then it will compare them.
- It will display that 2 is greater than 1000.
- It will display that JOHN is greater than BOB.
- It will display that ROBERT is greater than JOHN
- It will display then SWOGER is greater than MOBLEY.
You may find the program to be insulting and you may want to recommend changes to make it more acceptable.
Bob Swoger and John Mark Mobley
You should always fear a 4K submission that comes with it’s own Wikipedia link:
This one is a team entry. John writes:
Bob Swoger and I worked on this together.
Bob wrote the code in VCC most likely using a DOS editor and using toolshed to save it to a DSK file. I took the DSK file and loaded it into XRoar and saved to cassette. Then I switched XRoar to a 4k CoCo with Color BASIC mode and loaded the cassette. Then we discovered the 2^0.5 operator was missing and the SQR(2) function was missing. So I wrote a successive approximation SQR subroutine and got it working.
Then Bob and I debugged the code.
You can run assume the transmitter antenna is on a 17000 foot mountain and the receiver antenna is 4 foot tall.
It seems you could do some real work with a 4K machine after all. And the version submitted is actually V2. John added: “The original Radio Horizon program only did a 32-bit successive approximation SQR subroutine. I updated the Radio Horizon program to do 64-bit successive approximation SQR subroutine.”
Can we say this is a “64-bit” program running on a 1980 4K CoCo? ;-)
If you are planning on submitting, please let me know (email@example.com) so I can add you to the list.
More to come…
Pingback: 4K CoCo Programming Challenge update | Sub-Etha Software
Pingback: 1980 4K CoCo Programming Challenge | Vintage is the New Old
No one yet — I still have half a dozen more entries to list, then I will get all the cassette images available to folks can download and check them out and vote.
i like very much this homepage coco and trs 80 based.
We’re these ever posted to try out?
I don’t think so. I should revisit.
that would be great, thanks Allen!
I found some of them, but will have to find time to convert them, if possible, to ASCII. Most seem to have been sent as .cas emulator files.