Skip to content
/ tetrix Public

Tetris clone written in 8086/8088 assembly for IBM5150 and newer

License

Notifications You must be signed in to change notification settings

ifilot/tetrix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tetrix

Latest version Build procedure License: GPL v3

Purpose

Tetris clone for an IBM compatible using only MDA graphics (text mode). The game is specically programmed in 8086/8088 assembly and does not use e.g. any 80286 or higher instructions.

screenshot of titlescreen of Tetrix

screenshot of playfield of Tetrix

Downloads

Download the executable (.COM) file and/or 360KiB floppy image (.IMG).

Features

Currently, the following features are implemented:

  • Selection whether pieces are generated randomly or using a bag-of-seven procedure.
  • Select starting level (changes movement speed)
  • Upon rotation, the pieces are allowed to perform wall kicks using the SRS system.

Keymap

Tetrix uses the ASDF or the UP/DOWN/LEFT/RIGHT keys to move the pieces.

  • S/DOWN will move the piece downwards
  • A/LEFT will move the piece to the left
  • D/RIGHT will move the piece to the right
  • W/UP will rotate the piece in the clockwise direction. Currently, no counterclockwise rotation is implemented.

Compilation

To compile Tetrix, you need to install the NASM assembler.

sudo apt install -y nasm

Go to the src folder and run

make

Emulation

DOSBox

Tetrix can be run on a modern computer using emulation. DOSBox is the recommended application for running Tetrix. To run Tetrix in DOSBox, go to the src folder and run

make rundosbox

DOSBox-X

Although Tetrix runs perfectly in DOSBox, DOSBox does not support emulation of the 8086/8088 CPU and will happily execute instructions which are only valid for 80386 or higher CPUs. As such, for a somewhat more accurate emulation, one can use DOSBox-X. A configuration file is provided in the src folder to automatically configure DOSBox-X to emulate an 8086 CPU with the appropriate number of cycles. Note that to the best understanding of this author, DOSBox-X is in constrast to DOSBox not yet shipped with standard package managers and one has to compile and install the emulator on their machine. Detailed instructions are provided on the build page and the procedure is fairly simple. Once compiled and installed, Tetrix can be launched in the DOSBox-X emulator using the following instruction.

make rundosbox-x

Deployment

For deployment to actual hardware and to e.g. a browser-based IBM 5150 emulator, it is convenient to have a disk version of Tetrix available. To generate a 360KiB floppy disk image for Tetrix, run in the src folder:

./makeimg.sh

Useful resources

About

Tetris clone written in 8086/8088 assembly for IBM5150 and newer

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages