This is a C implementation of WheatSystem for the WheatBox 55A1 computer. I hope that a Tractor implementation will supersede this one eventually. However, I need to satisfy my craving to build a cute little computer, so the Tractor version will need to wait. The code in this repo is largely derived from my older wheatsystem-c repo.
This project has the following system-wide dependencies:
- avr-gcc
- gcc
- Node.js version ^16.4
- TypeScript version ^4.5
- pnpm version ^6.24
To compile the AVR firmware:
make avr
To compile the emulator:
make unix
To set up utility scripts:
- Install dependencies:
pnpm install - Compile the scripts:
npm run build
To assemble example volumes:
node ./dist/assembleVolumes.js
To run the emulator:
./build/main_unix (volumeFilePath)
The emulator also supports an integration test mode which communicates over a domain socket. Please see wheatsystem-tests for tests to run:
./build/main_unix --integration-test (socketPath)
To flash the firmware:
make flash
To write an example volume to EEPROM:
- Assemble the example volumes as described earlier.
- Connect a USB serial cable to your WheatBox 55A1.
- Power on WheatBox 55A1 while holding the ACTIONS button to activate storage transfer mode.
- Write the volume:
node ./dist/writeEeprom.js (volumeFilePath)
This repository includes the following example volumes:
addNumbersprovides a minimal example of a system volume. It only contains awsBootbytecode app which adds two integers in memory, and does not display the result.primesgenerates prime numbers and displays them using the terminal driver.keyswaits for the user to press a key, and displays the corresponding key code.serialprovides example usage of the serial driver. It waits to receive a byte over a serial connection, displays the byte as decimal text, and sends the decimal text back over serial. You can use the scripttsSrc/testSerialVolume.tsto test the example volume.shellcontains the files below:wsShellis an implementation of the standard system shell. It allows multiple applications to display their own windows. To switch between windows, press the system menu key (the home key in the emulator)fileManagerallows the user to perform various file operations:- Launch applications
- View file attributes
- Modify file attributes
- Rename files
- Duplicate files
- Delete files
dummycreates a window and displays a message.utilsis a library which provides functions to various applications.
demoAppsincludeswsShell,fileManager, andutilsas defined in theshellvolume, and also includes several demo applications:primesgenerates prime numbers and displays them in a window.calculatorperforms addition, subtraction, multiplication, and division on floating-point numbers.wheatTextis a text editor for multi-line text files.hexEditallows the user to view and edit binary files.caveJourneyis a simple roll-playing game.hangmanis a word puzzle game.