tsoding / pinpog

Ping-Pong-like game in Assembly that works without OS
MIT License
571 stars 36 forks source link

It's not clear how to run the project in VirtualBox #38

Open rexim opened 5 years ago

elenderg commented 2 years ago

You should run the game in QEMU

Vyjill commented 7 months ago

How to run this project on VirtualBox ?

TL;DR : use qemu.

Create a new virtual machine

Create a floppy disk containing the game

Assuming you already compiled the game, you should have the pinpog binary in the project directory.

Using windows powershell

$pinpog = [System.IO.File]::ReadAllBytes('pinpog')
$floppy = $pinpog + @(0) * (1474560-$bytes.Length)
[io.file]::WriteAllBytes('floppy_pinpog.vfd', $towrite)

Using linux bash

head -c 1474560 /dev/zero > floppy_pinpog.vfd
sudo dd if=./pinpog of=./floppy_pinpog.vfd

Using python

pinpog_file = open("pinpog", "rb")
floppy_file = open("floppy_pinpog.vfd", "wb")

game_bytes = pinpog_file.read()

floppy_file.write(game_bytes + b'\x00'*(1474560-len(game_bytes)))

pinpog_file.close()
floppy_file.close()

Add the floppy disk to Virtualbox storage

In your virtual machine configuration > storage, add a floppy controller I82078 (floppy). Then add the newly created floppy image to the floppy controller (Add > Add > select the .vfd file).

image image


You can now run pinpog on VirtualBox.