Skip to content

tarik-sen/SpaceWars

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SpaceWars

16-bit real-mode assembly rendition of classic space game.

Installation

Requirements:

  • GNU Compiler Collection (gcc)

Check the prerequisite by:

apt-cache policy gcc

Install if not already:

sudo apt-get install gcc

Source

git clone 'https://github.com/tarik-sen/SpaceWars.git'
cd SpaceWars

Commands to run

Create object files

as genericBootloader.s -o genericBootloader.o
as SpaceWars.s -o SpaceWars.o

Link phase

ld genericBootloader.o -o genericBootloader.bin --oformat binary -Ttext 0x7c00 -e _start
ld SpaceWars.o -o SpaceWars.bin --oformat binary -Ttext 0x9000 -e _KernelStart

You can either test it on qemu or on your own hardware.

1) QEMU

Burn anywhere you want and test with qemu.

⚠️ If QEMU is not installed, run "sudo apt install qemu-kvm".

dd if=genericBootloader.bin of=kernel_test bs=512 status=progress
dd if=SpaceWars.bin of=kernel_test bs=512 status=progress seek=1

qemu-system-x86_64 kernel_test

2) Bare metal

Burn into your usb. Start the computer from your usb to test it.

dd if=genericBootloader.bin of=/dev/sda bs=512 status=progress
dd if=SpaceWars.bin of=/dev/sda bs=512 status=progress seek=1

Releases

No releases published

Packages

No packages published