Giter Site home page Giter Site logo

ashajjar / tetris-os-2 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from vladcc/tetris-os

0.0 0.0 0.0 45 KB

Tetris running on bare x86 hardware

License: BSD 3-Clause "New" or "Revised" License

Shell 0.06% C 83.27% Assembly 14.60% Makefile 2.07%

tetris-os-2's Introduction

Tetris-OS

Tetris running on bare x86 hardware

Programming at the hardware level is so much fun.

It has it's own boot loader and runs in 32 bit protected mode. The boot code is written for NASM, the system written in C and compiled with gcc. The core of the system consists of drivers for the programmable interrupt controller, the programmable interval timer, the keyboard, and the monitor. It does not use a file system, instead the BIOS loads the whole binary code chunk into memory on boot.

You can use both the .img and the .iso to boot from the floppy or the cd of a virtual machine, or a x86 emulator. You can write the .img on a flash drive and boot on real hardware. If you want to try run a Linux and do:

dd if=TetOS.img of=/dev/sdb

where /dev/sdb is your inserted falsh drive. If you are not sure which device it is, try fdisk -l.

IMPORTANT: this will re-write the first sectors of your flash drive, rendering it unusable (for other purposes). You may lose data. Back up the sectors first or you'll have to re-format the drive.

I haven't tried booting from an actual CD, but I did manage to boot on an old EeePC (remember those?) from a flash drive. It crashes after a while, though.

If you want to build the project yourself you will need a Linux, gcc, NASM, and QEMU for running it on the spot. Download the source, go into the tetris_os directory and do:

make -f os.make

This will get you a TetOS.img file. To make an iso from that do:

make -f iso.make

To run it do:

qemu-system-x86_64 -fda TetOS.img

or use the run.sh script (which does the same thing). To clean everything and leave only the source code do:

make -f clean.make

tetris-os-2's People

Contributors

vladcc avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.