TETRIS-OS: An operating system that only plays Tetris.

Overview

TETRIS-OS: An operating system that only plays Tetris.

screenshot

Video with an explanation of the development process.

Features:

  • It's Tetris.
  • 32-bit (x86)
  • Fully custom bootloader
  • Soundblaster 16 driver
  • Custom music track runner
  • Fully hardcoded tetris theme
  • Double-buffered 60 FPS graphics at 320x200 pixels with custom 8-bit RGB palette

Resources Used

Building & Running

NOTE: This has only been tested in an emulator. Real hardware might not like it.

EDIT: this is not true anymore! @parkerlreed has run this on a Thinkpad T510.

Mac OS

For the cross-compiler: $ brew tap nativeos/i386-elf-toolchain && brew install i386-elf-binutils i386-elf-gcc

$ make iso
$ qemu-system-i386 -drive format=raw,file=boot.iso -d cpu_reset -monitor stdio -device sb16 -audiodev coreaudio,id=coreaudio,out.frequency=48000,out.channels=2,out.format=s32

Unix-like

You should not need a cross-compiler in most cases as the gcc shipped in most linux distros will support i386 targets.

If this isn't the case for you, read here about getting a cross-compiler.

To run:

$ make iso
$ qemu-system-i386 -drive format=raw,file=boot.iso -d cpu_reset -monitor stdio -device sb16 -audiodev pulseaudio,id=pulseaudio,out.frequency=48000,out.channels=2,out.format=s32

If you have sound device issues, try building without the #define ENABLE_MUSIC in main.c and running with $ qemu-system-i386 -drive format=raw,file=boot.iso.

If you're having issues with no image showing up/QEMU freezing, this is a known bug with QEMU SB16 emulation under GTK. Please read what @takaswie has written in #2 for a workaround.

Windows

Absolutely no idea. Maybe try WSL.

Real hardware

You probably know what you're doing if you're going to try this. Just burn boot.iso onto some bootable media and give it a go. If things break, try disabling all of the music (remove #define ENABLE_MUSIC in main.c) since you probably don't have something with a SB16 in it.

You might also like...
A simple Unix like operating system from scratch.
A simple Unix like operating system from scratch.

HOS-x86 an x86 operating system written from scratch How to Build? Currently you need NASM, GCC and QEMU to build the image file. Install the packages

IbisOS is a custom operating system
IbisOS is a custom operating system

IbisOS The IbisOS Source Code Guide Step1, How in the hell do I compile this OS? well you need to install xorriso, clang, nasm and cmake as well as gr

🦠 µnix is a UNIX-like operating system for the raspberry pi pico.
🦠 µnix is a UNIX-like operating system for the raspberry pi pico.

The µnix Operating System "µnix", "munix" or, "micro unix" aims to be a micro kernel based operating system targeting the Raspberry Pi Pico. "µnix" is

 SerenityOS - Graphical Unix-like operating system for x86 computers. 🐞
SerenityOS - Graphical Unix-like operating system for x86 computers. 🐞

SerenityOS is a love letter to '90s user interfaces with a custom Unix-like core. It flatters with sincerity by stealing beautiful ideas from various other systems.

Doom port for InfOS - the University of Edinburgh Informatics research operating system used in the UG3 OS course
Doom port for InfOS - the University of Edinburgh Informatics research operating system used in the UG3 OS course

Doom on InfOS InfOS is the Informatics research operating system, designed specifically for the UG3 Operating Systems course. This project aims to por

An x86_64 operating system
An x86_64 operating system

Vigil Vigil is a x86_64 operating system. Features Booted by Limine using the stivale2 protocol Physical memory manager Virtual memory manager "Slab"

A unix operating system made from scratch using c++
A unix operating system made from scratch using c++

pranaos A unix operating system made from scratch using c++ Dependencies g++ version should be more than 10.0.0 ninja gcc compiler needed prana os is

Operating System Coded in Assembly and C

SimpleOS Operating System Coded in Assembly and C. Has a Virtual Filesystem, Simple Shell, GDT and IDT, and more. Planning to add networking functiona

KGKernel1 is an operating system written in C

Kernel commands echo: echo 'String' clr shellcolor: shellcolor colorcode cursorset: cursorset cursorcode reboot shutdown calc cursorcodes cursorcode 0

Releases(baf4c98)
Owner
null
Plays native alert sound and shows native dialogs/alerts in your Flutter app.

flutter_platform_alert 2021 © Weizhong Yang a.k.a zonble. A simple plugin to present native alerts, including playing alert sounds and showing alert d

Weizhong Yang a.k.a zonble 60 Dec 21, 2022
VEX v5 Pro program that records driver movements and plays them back during the autonomous period.

Autonomous Recorder This code was written for team 5588R, but it can be easily modified to work with your team's robot. Notes Code isn't fully finishe

brett 2 Jun 21, 2022
Malloc geiger is a hook for malloc that plays geiger counter blips in proportion to the amount of calls to malloc as a way of knowing what an application does

Malloc Geiger Malloc geiger is a hook for malloc that plays geiger counter blips in proportion to the amount of calls to malloc as a way of knowing wh

David Larsson 321 Dec 19, 2022
Operating system project - implementing scheduling algorithms and some system calls for XV6 OS

About XV6 xv6 is a modern reimplementation of Sixth Edition Unix in ANSI C for multiprocessor x86 and RISC-V systems.

Amirhossein Rajabpour 22 Dec 22, 2022
Hobbyist Operating System targeting x86_64 systems. Includes userspace, Virtual File System, An InitFS (tarfs), Lua port, easy porting, a decent LibC and LibM, and a shell that supports: piping, file redirection, and more.

SynnixOS Epic Hobby OS targeting x86_64 CPUs, it includes some hacked together functionality for most essential OSs although, with interactivity via Q

RaidTheWeb 42 Oct 28, 2022
Tetris on a Raspberry Pi Pico mounted on a Pimoroni Pico Explorer

PicoTetris Classic Tetris game running on a Raspberry Pi Pico microcontroller. Pico C port by Richard Birkby Original JavaScript implementation - Jake

Richard Birkby 34 Dec 3, 2022
Tetris bot

Lemon Tea Guildline versus tetris bot How to build Notices Lemon Tea makes use of standard library header <bit> available in C++20, so make sure your

null 5 Aug 18, 2022
A version of Tetris with randomly generated polyominoes of varying sizes

Multris A version of Tetris with randomly generated polyominoes of varying sizes ----- CONTROLS ----- LEFT / RIGHT ARROW - Move. Hold to move quicker.

null 17 Nov 5, 2022
An AI for playing NES Tetris at a high level. Based primarily on search & heuristic, with high quality board evaluation through value iteration.

StackRabbit An AI that plays NES Tetris at a high level. Primarily based on search & heuristic, with high-quality board eval through value iteration.

Greg Cannon 244 Jan 5, 2023
Simple Tetris clone written in C++ using SFML

stetris Simple Tetris clone written in C++ using SFML. The game has been tested only on GNU/Linux system so far. Building dependencies (on Linux) g++

sewe2000 3 Jun 14, 2022