diff options
Diffstat (limited to 'boot.php')
-rw-r--r-- | boot.php | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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; |