• This repository has been archived on 14/Feb/2020
  • Stars
    star
    127
  • Rank 282,790 (Top 6 %)
  • Language
    Assembly
  • Created over 9 years ago
  • Updated about 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Tetris for x86 in NASM

Tetrasm

Tetris for x86 in NASM.

Somewhat a port from C of Bare Metal Tetris.

Screenshot

Features

  • Ghost
  • Preview
  • Hold
  • Scoring
  • Levels with increasing gravity
  • Line clear "animation"
  • Lock delay with limited movement
  • Pause

Binaries

ELF binaries and ISO images can be downloaded on the releases page.

Dependencies

  • NASM, with support for elf32 output format
  • Linker capable of emulating elf_i386
  • genisoimage (from cdrkit) or mkisofs (from cdrtools)

If the system linker does not support emulating elf_i386, a cross-linker can be built from GNU binutils. Use ./configure --target i386-elf, then set LD = i386-elf-ld.

To use mkisofs instead of genisoimage, set GENISOIMAGE = mkisofs.

Make variables can be set on the command line or in config.mk.

Build

make

This will assemble and link a multiboot ELF file, tetrasm.elf.

The default build is debug, which includes debug symbols and runtime debug functions. The release build excludes these.

make BUILD=release

There is also a test build, which features tests of the core functions rather than the game.

make BUILD=test

ISO

make iso

This will create a bootable ISO using GRUB Legacy, tetrasm.iso.

Emulation

make qemu BUILD=release

This will boot tetrasm.elf in QEMU using multiboot. If run in the debug build, waits for a debugger to attach.

make qemu-iso BUILD=release

This will boot tetrasm.iso in QEMU.

Debugging

make gdb

This will attach GDB to QEMU started from make qemu.

License

Copyright © 2015, Curtis McEnroe [email protected]

Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

More Repositories

1

writ

Opinionated, classless styles for semantic HTML
HTML
464
star
2

bare-metal-tetris

Tetris for x86 in bad C. Succeeded by Tetrasm.
C
60
star
3

effuse

Over-engineered tool for symlinking dotfiles
Ruby
35
star
4

inth-oauth2

OAuth2 client for Rust
Rust
30
star
5

pult

Access local servers on .dev domains (ruined by Google)
JavaScript
25
star
6

befungee

Befunge-93 interpreter written in Python with a debugger
Python
19
star
7

fuckit.rb

The Ruby Error Steamroller
Ruby
18
star
8

careen

Straightforward SQL schema migration, never used
TypeScript
16
star
9

errio

Error serialization and deserialization
JavaScript
12
star
10

lispy

An experimental Lisp implementation in Python
Python
11
star
11

osdev-starter-kit

I thought I might be able to help others attempting to write a multiboot kernel
C
10
star
12

omgircd

A mostly unusable IRCd in Python
Python
8
star
13

caps

Store any file on anonymous public services
JavaScript
8
star
14

keyloog

Simple keylogger for X11
C
6
star
15

fix

Fixed-point numbers
Rust
6
star
16

itchy.vim

Scratch buffers for Vim
Vim Script
6
star
17

rcmp

VCS push notification IRC bot which doesn't work anymore
Ruby
5
star
18

proxos

Just for fun OS
C
5
star
19

amusos

What could have been a retro-style games OS for x86
C
5
star
20

forklimit

Preventing fork bombs since 2013
C
5
star
21

advent-of-befunge

Advent of Code 2015 in Befunge, days 1–3
HyPhy
4
star
22

gury

Upload any data blob to imgur
JavaScript
4
star
23

lixp

Some kind of Lisp in ooc
ooc
4
star
24

perpetual

Attempted something-Lisp implementation in C
C
4
star
25

xn--ls8h

PILE OF POO
Rust
4
star
26

bounded-integer

Bounded integers for Rust, probably broken
Rust
4
star
27

configru

YAML configuration file loader
Ruby
4
star
28

dirt

Bayes classification applied to code, with strange technology choices
Ruby
3
star
29

letterwang

A multiplayer word-spelling game prototype
JavaScript
3
star
30

viola

A gap buffer implementation that wants to one day be a Vi-like editor
Rust
3
star
31

oauth2-paste

Copy & paste OAuth2 authorization callback
HTML
3
star
32

keycounter

A keystroke counter for X11
C
3
star
33

projen

Project template tool, never used
Ruby
2
star
34

multipaint

A horrible multiplayer paint experiment
Ruby
2
star
35

indiana

Broken port of Jonesforth to x86_64 NASM, Darwin, FreeBSD, Linux
Assembly
2
star
36

undawdle

Glorified /etc/hosts blocking
Ruby
2
star
37

csslj

Library for representing CSS in Clojure in the same style as Hiccup
Clojure
2
star
38

pinion

A panel, failed
Ruby
2
star
39

squalo

A small GTK Grooveshark client in Ruby from back in the day
Ruby
2
star
40

wdpg

A sloppy attempt to import WordNet into PostgreSQL
Ruby
2
star
41

muorg

Screw up your entire music library
Ruby
1
star
42

spibble

Unfinished service to scrobble vinyl records
Clojure
1
star
43

rex

"Regular Expression Swiss-Army-Knife," probably my first GitHub repository
Python
1
star
44

cljmb

MusicBrainz API client in Clojure, probably broken
Clojure
1
star
45

fbgrab

Import of FBGrab releases
C
1
star
46

eleventhbot

The real bot. The best bot.
Ruby
1
star
47

spatula

Attempted something-Lisp implementation in ooc
ooc
1
star
48

miscbot

A Cinch bot that does some things
Ruby
1
star
49

bsh

A terrible attempt at a Unix shell
C
1
star
50

lastirc

Last.fm IRC bot, broken
Ruby
1
star
51

hemp

Small JavaScript string builder, mostly useless
JavaScript
1
star
52

befungeec

Befunge interpreter in C
C
1
star
53

trios

My third attempt at a kernel that does something
C++
1
star
54

mayhaps

Don't use Ruby like this
Ruby
1
star
55

prong

A Pong clone written in Ruby using Gosu, likely to never build again
Ruby
1
star
56

aoc

Advent of Code
Rust
1
star
57

fresh

Random password reset automation, unfinished
Rust
1
star