Port of the classic 2048 game to the MPF-II / TK2000 home computer.
Find a file
hkz 4fd200b7b7 Squashed commit of the following:
commit ce479dacb9
Author: hkz <tabaglio@posteo.net>
Date:   Fri Oct 17 09:31:15 2025 +0200

    Update README and CHANGELOG

commit 6840e57190
Author: hkz <tabaglio@posteo.net>
Date:   Wed Oct 15 13:25:23 2025 +0200

    Rework graphics

commit 0f0fe3ecb7
Author: hkz <tabaglio@posteo.net>
Date:   Wed Oct 15 13:10:55 2025 +0200

    Rework graphics

commit f258d81f73
Author: hkz <tabaglio@posteo.net>
Date:   Wed Oct 15 12:54:29 2025 +0200

    Rework colors

commit 631097903b
Author: hkz <tabaglio@posteo.net>
Date:   Wed Oct 15 09:24:59 2025 +0200

    Centralize versioning

commit 3219687fd7
Author: hkz <tabaglio@posteo.net>
Date:   Wed Oct 15 07:38:55 2025 +0200

    move some definitions outside of utility.h

commit 07d054ea51
Author: hkz <tabaglio@posteo.net>
Date:   Tue Oct 14 14:03:24 2025 +0200

    Tweak some initialization code

commit d920f68139
Author: hkz <tabaglio@posteo.net>
Date:   Tue Oct 14 11:04:53 2025 +0200

    Reworked wait time before making a move in demo mode

commit a3425993b1
Author: hkz <tabaglio@posteo.net>
Date:   Tue Oct 14 08:57:48 2025 +0200

    Tweak strings to indicate DEMO mode

commit 46f3662322
Author: hkz <tabaglio@posteo.net>
Date:   Tue Oct 14 08:39:41 2025 +0200

    Rewritten the irq handler

commit 2999c7c218
Author: hkz <tabaglio@posteo.net>
Date:   Mon Oct 13 21:10:54 2025 +0200

    fix saving

commit e7a5006a4a
Author: hkz <tabaglio@posteo.net>
Date:   Mon Oct 13 21:00:29 2025 +0200

    nitial working version for the VDP

commit 735513e5c8
Author: hkz <tabaglio@posteo.net>
Date:   Mon Oct 13 19:36:20 2025 +0200

    Fix game mode

commit 76fed16432
Author: hkz <tabaglio@posteo.net>
Date:   Mon Oct 13 18:59:02 2025 +0200

    Re-enable partial drawing

commit f5cfc0f5da
Author: hkz <tabaglio@posteo.net>
Date:   Mon Oct 13 18:46:08 2025 +0200

    Use signed arithmetics for game logic

commit 5348adcd72
Author: hkz <tabaglio@posteo.net>
Date:   Mon Oct 13 17:53:49 2025 +0200

    Enable tiles redrawing

commit 31018463ad
Author: hkz <tabaglio@posteo.net>
Date:   Mon Oct 13 17:48:52 2025 +0200

    Fix joystick code

commit 7c4385972d
Author: hkz <tabaglio@posteo.net>
Date:   Mon Oct 13 17:24:13 2025 +0200

    Begin fixing game code

commit 78604e6f7d
Author: hkz <tabaglio@posteo.net>
Date:   Mon Oct 13 16:24:29 2025 +0200

    Begin writing code to update the tiles

commit 26e94d2957
Author: hkz <tabaglio@posteo.net>
Date:   Mon Oct 13 11:43:41 2025 +0200

    Begin wiring in the VDP code in the game module

commit 28a1fbfc18
Author: hkz <tabaglio@posteo.net>
Date:   Mon Oct 13 10:09:43 2025 +0200

    Implement (untested) code to draw joystick

commit d3d2207b4f
Author: hkz <tabaglio@posteo.net>
Date:   Mon Oct 13 08:44:00 2025 +0200

    Add dummy demo and game modules for VDP

commit 5deb0d802f
Author: hkz <tabaglio@posteo.net>
Date:   Sun Oct 12 21:27:15 2025 +0200

    Update the charset

commit d2cd7356ec
Author: hkz <tabaglio@posteo.net>
Date:   Sun Oct 12 21:19:43 2025 +0200

    Tweak nametable for the dialog

commit dd0e5ce53d
Author: hkz <tabaglio@posteo.net>
Date:   Sun Oct 12 21:12:24 2025 +0200

    Integrate the new dialog module for the VDP

commit b4469d514c
Author: hkz <tabaglio@posteo.net>
Date:   Sun Oct 12 15:25:31 2025 +0200

    Add dummy module for VDP dialog

commit d1dcdd1381
Author: hkz <tabaglio@posteo.net>
Date:   Sun Oct 12 12:15:23 2025 +0200

    Add initializer module for VDP

commit fd84d3abbb
Author: hkz <tabaglio@posteo.net>
Date:   Tue Oct 7 20:15:46 2025 +0200

    Begin defining binaries

commit bd650081fc
Author: hkz <tabaglio@posteo.net>
Date:   Tue Oct 7 15:02:56 2025 +0200

    Add resources for two screens of the VDP version

commit 58f7436c45
Author: hkz <tabaglio@posteo.net>
Date:   Tue Oct 7 12:52:38 2025 +0200

    Add a module list with defines

commit 969fe9deab
Author: hkz <tabaglio@posteo.net>
Date:   Tue Oct 7 12:35:40 2025 +0200

    Additional renaming

commit 83552c2ad8
Author: hkz <tabaglio@posteo.net>
Date:   Tue Oct 7 12:14:27 2025 +0200

    Rename other graphic files, remove unused imports

commit dbc1bebf9f
Author: hkz <tabaglio@posteo.net>
Date:   Tue Oct 7 11:59:16 2025 +0200

    Begin renaming graphic files to mention they're for HGR
2025-10-17 09:34:26 +02:00
data Squashed commit of the following: 2025-10-17 09:34:26 +02:00
dsk Add basic disk images 2025-07-28 17:45:33 +02:00
graphics Squashed commit of the following: 2025-10-07 09:02:18 +02:00
linker-files Squashed commit of the following: 2025-10-17 09:34:26 +02:00
obj Import empty project 2025-07-15 20:51:44 +02:00
out Import empty project 2025-07-15 20:51:44 +02:00
pics Squashed commit of the following: 2025-10-17 09:34:26 +02:00
src Squashed commit of the following: 2025-10-17 09:34:26 +02:00
.gitignore Import empty project 2025-07-15 20:51:44 +02:00
CHANGELOG.md Squashed commit of the following: 2025-10-17 09:34:26 +02:00
LICENSE Add LICENSE 2025-09-01 22:32:34 +02:00
Makefile Squashed commit of the following: 2025-10-17 09:34:26 +02:00
README.md Squashed commit of the following: 2025-10-17 09:34:26 +02:00

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

TK2048 V2.0 title screen

This game is an excuse and a testbed for the development on the Microdigital TK2000 clone I recently built for myself.

My primary objective with this game is building something where I can add support for all my expansion boards (well, at least where it makes a sliver of sense) so I can test and PoC them, beside, I want to experiment with the Calypsi toolchain.

I decided for a port of 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 V1.0 main game shown on a green phosphor CRT

Support

If you wish to support me in building new hardware and software for old machines, throw a few euros in my direction via Ko-Fi !

Current state

The game is playable, and the following features have been implemented:

  • B/W mode
  • VDP board support
  • Single graphical tileset
  • Simple sound effects
  • Control via keyboard
  • 5x5 grid, with randomized start and new tiles
  • Game save/load
  • Highscore saving
  • Demo mode

How to play

  • You can move the tiles using the cursor keys
  • CTRL-R during the game will clear your score and restart
  • CTRL-S during the game will save the game on floppy and let you continue
  • CTRL-L during the game will load the previous save from floppy and let you continue from there

The game ends once you reach a tile with a value of 2048.

VDP support

The game supports the TK2000 VDP board configured at address C0Cx.

TK2048 VDP Game screen

The card gets automatically detected and used: once the game completes the initial load, everything will be displayed on the screen connected to the VDP board, and the main screen connected to the TK2000 will be left blank.

If you want to override detection and force the use of the main screen, just keep a button pressed while the title screen image loads.

Floppy version

Just put your floppy in the first drive and power on the TK2000. It will autoboot.

How to build

You need the following:

The future

I plan to add (optional) support for several expansion boards I'm working on, starting with a VDP board sporting a TMS9918A graphic processor.