# TK2048 ## DISCLAIMER Any use of this project is **under your own responsibility**. By using this project You will agree that I cannot be held responsible if it will destroy any of your devices, damage your computer, burn down your house or whatever. ## Introduction I recently built myself a Microdigital TK2000, a clone of an almost-clone (the MPF-II) of an Apple II. Building it from the files found in [this github repository](https://github.com/clemarfolly/Microdigital-TK2000) proved to be a [bit of an adventure](https://github.com/hkzlab/TK2000_Build_Notes), but I took a liking to the computer, so I started developing [boards](https://codeberg.org/hkzlab) for it. Hardware fiddling is fine, but given that there isn't much software available for the machine and that I wanted to experiment with the [Calypsi toolchain](https://www.calypsi.cc/) a bit, I decided to pick a simple game concept and develop it for the machine. I decided for 2048, the now-classic tile sliding game, as it provided several advantages as a first time/playground project: - Doesn't need complex graphics hardware or advanced artist skills - It can be drawn in B/W with static graphics, but animations and colors can be added in the future - Sound is not needed either, but can be added for simple events like a tile slide or a button press - The game logic is pretty simple - Not CPU or memory intensive - Can be expanded with support for additional hardware (sound cards, video cards, timers) if so desired, but it's not necessary - Floppy drive can be potentially used not only to load the game, but also for saving the high score ![TK2048 main game shown on a green phosphor CRT](pics/screenshot.jpg) ### Current state The game is playable, and the following features have been implemented: - B/W mode - Single graphical tileset - Crude sound (only beeps) - Control via keyboard - 5x5 grid, with randomized start and new tiles ## How to play You can move the tiles using the cursor keys. Pushing CTRL-R will make you lose the game and restart it. The game ends once you reach a tile with a value of 2048. ### Floppy version Just put your floppy in the first drive and power on the TK2000. It will autoboot. ### Tape version Power on the TK2000 with the sound player connected to the EAR input. Once at the `>` prompt, type the following ``` CALL -159 ``` This will drop you into the monitor, `@` prompt. Type ``` 801.4EBBRA ``` And press play on tape. If the load completes successfully, the computer will beep and give you back the prompt. Now type: ``` 801G ``` This will start the game. ## How to build You need the following: - GNU Make (I used the one provide via [MSYS2](https://www.msys2.org/)) - [Calypsi 6502 toolchain](https://www.calypsi.cc/) (tested with 5.10) - [AppleCommander](https://github.com/AppleCommander/AppleCommander), "ac" command line version (tested with 1.9.0) - [dsk2woz](https://github.com/TomHarte/dsk2woz) - vitasam's fork of [c2t](https://github.com/vitasam/c2t) ## The future I plan to refactor the whole game, modularize it, and leverage loading of single modules from a floppy disk. This should give more flexibility, expandability, free some memory and allow me to exercise the floppy drive routines I wrote. As such, V1.0 will probably be the last one supporting loading from tape.