A downloadable game

This is a DOS game. Download toy.exe to play it on FreeDOS or DOSBox or any other DOS system. Compile the source code using OpenWatcom.

I teach university courses part-time, and one course that I teach is MIS 100, where students learn how technology works. For our section on "programming," I usually talk about programming in very abstract terms, because these are not Computer Science students. But this year, I wanted to try something new.

I hoped to start the "programming" discussion by walking my students through a history of programming, so they could see the next step and how that worked. I tried to find a simple hobby "educational" computer, similar to the Altair 8800, where you input a series of program instructions in "machine language" (binary opcodes) using switches and LEDs. I wanted the instructions to be simple enough that my students could write a few simple programs, like A+B=C, and use that as a starting point to write the same program in Assembly, and in C, and ... you get the idea.

But I couldn't find a suitable "Altair-like" SBC for less than $100. There are "Altair" software emulators out there, but they faithfully reproduce the Altair 8800, and that was too much overhead for my needs.

So I decided to write my own hobby "educational" computer. I call it the Toy CPU.

I wrote a rough prototype on DOS using character mode, but you couldn't enter a program on the "front panel." Instead, you had to hard-code a program into memory, and recompile to run that. It was very primitive, but enough to know that it worked.

Later, I completely rewrote the Toy CPU using Linux ncurses. This was still a prototype, but this time you could enter a program on the "front panel" by "flipping bits." It looked okay in ncurses, but I really wanted a graphical program.

Open Jam 2022 came up at the right time! I decided to completely rewrite the Toy from scratch, using FreeDOS and other open source tools. I don't use graphical assets per se; instead, the Toy draws the interface elements using basic graphical functions from OpenWatcom (open source). If you're curious: I used FED (open source) as my editor. I ran FreeDOS inside VirtualBox (open source) running on top of Fedora Linux (open source). Everything in the pipeline was open source.


The theme for Open Jam 2022 is "Light in the Darkness," which is a perfect fit for the Toy CPU, because of all the blinkenlights!

More information, including opcodes and sample programs you can try out are on my GitHub project.
StatusReleased
Release date Oct 30, 2022
Rating
Rated 5.0 out of 5 stars
(1 total ratings)
Authorjimhall
GenreSimulation
Tagscpu, DOS, freedos
Code licenseMIT License
Average sessionAbout a half-hour
LanguagesEnglish
InputsKeyboard
AccessibilityColor-blind friendly, High-contrast
LinksSource code, Patreon

Download

Download
toycpu.zip 12 kB
Download
toy.exe 39 kB

Comments

Log in with itch.io to leave a comment.

Why not writing this in a "modern" env? Say Qt? Don't get me wrong.. I'm an old  geek who enjoys retro tools and own a couple of commodore and Z80s. Just asking for your rationale while playing with the idea of writing the same using a game engine.

(+1)

I'm also part of the FreeDOS Project, so part of my goal was to write this in DOS too. And C was the easiest path for me to do that. :-)

(+1)

Watch a video of the Toy CPU in action!