summaryrefslogtreecommitdiffstats
path: root/boot.php
diff options
context:
space:
mode:
Diffstat (limited to 'boot.php')
-rw-r--r--boot.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/boot.php b/boot.php
index ddc724a..ef2d8b6 100644
--- a/boot.php
+++ b/boot.php
@@ -3,11 +3,14 @@
require_once __DIR__.'/vendor/autoload.php';
use GameBoy\Core;
+use GameBoy\Keyboard;
use GameBoy\Settings;
$rom = base64_decode(file_get_contents('drmario.rom'));
$core = new Core($rom);
+$keyboard = new Keyboard($core);
+
$core->start();
if ($core->stopEmulator & 2 == 2) {
@@ -16,6 +19,7 @@ if ($core->stopEmulator & 2 == 2) {
while (true) {
$core->run();
+ $keyboard->check();
}
} else if (($core->stopEmulator & 2) == 0) {
echo "The GameBoy core is already running." . PHP_EOL;