PHPackages                             gabrielrcouto/php-terminal-gameboy-emulator - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [CLI &amp; Console](/categories/cli)
4. /
5. gabrielrcouto/php-terminal-gameboy-emulator

ActiveLibrary[CLI &amp; Console](/categories/cli)

gabrielrcouto/php-terminal-gameboy-emulator
===========================================

Terminal Gameboy Emular

0.1.0(10y ago)1.6k716↓100%111[6 issues](https://github.com/gabrielrcouto/php-terminal-gameboy-emulator/issues)MITPHPPHP &gt;=5.6.0

Since Feb 25Pushed 5y ago80 watchersCompare

[ Source](https://github.com/gabrielrcouto/php-terminal-gameboy-emulator)[ Packagist](https://packagist.org/packages/gabrielrcouto/php-terminal-gameboy-emulator)[ Docs](http://github.com/gabrielrcouto/php-terminal-gameboy-emulator)[ RSS](/packages/gabrielrcouto-php-terminal-gameboy-emulator/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

[![PHP Terminal GameBoy Emulator](https://cloud.githubusercontent.com/assets/2197005/13260438/2f6e96ac-da3a-11e5-86cf-bbfa15083f74.gif)](https://cloud.githubusercontent.com/assets/2197005/13260438/2f6e96ac-da3a-11e5-86cf-bbfa15083f74.gif)

[![Build Status](https://camo.githubusercontent.com/5a5deb3b70b7fca1709e15ef96e9289e1aaa7482596176c9f6524f3b1be44ca5/68747470733a2f2f7472617669732d63692e6f72672f6761627269656c72636f75746f2f7068702d7465726d696e616c2d67616d65626f792d656d756c61746f722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/gabrielrcouto/php-terminal-gameboy-emulator)[![Software License](https://camo.githubusercontent.com/f251623e510f5909f16ae3f4e6e548dac11340b9fde1a99be26b015b39272c00/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c6174)](http://gabrielrcouto.mit-license.org/)[![Packagist](https://camo.githubusercontent.com/9b8cb8fdb221c54d659d888db33dd54491ebafa5287425b10dfe8990681585e2/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7061636b61676973742d696e7374616c6c2d627269676874677265656e2e737667)](https://packagist.org/packages/gabrielrcouto/php-terminal-gameboy-emulator)

Want to play Dr Mario or Pokémon on your server terminal? That's for you!

Table of Contents
-----------------

[](#table-of-contents)

- [Why](#why)
- [Requirements](#requirements)
- [Running](#running)
- [Controls](#controls)
- [Tests](#tests)
- [TO-DO](#to-do)
- [Credits](#credits)
- [Legal](#legal)

Why
---

[](#why)

Some people will ask me: *"Why you did that?"*

Well, a friend asked me *"What PHP can do?"*. I thought about that awhile and the idea came up. With PHP7's performance improvement now it's possible to emulate some systems 😄 and, come on, that's funny! 👯

It's based on the [GameBoy JS Emulator](https://github.com/taisel/GameBoy-Online).

Requirements
------------

[](#requirements)

The following PHP versions are supported:

- PHP 5.6
- PHP 7
- HHVM

You will need a good terminal! I've tested only on MacOSX and Linux. I'm sorry about that Windows guys 😞

Installation
------------

[](#installation)

Using composer:

```
$ composer g require gabrielrcouto/php-terminal-gameboy-emulator:dev-master
```

Using PHAR:

```
$ wget https://raw.githubusercontent.com/gabrielrcouto/php-terminal-gameboy-emulator/master/bin/php-gameboy.phar
$ chmod +x php-gameboy.phar
$ mv php-gameboy.phar /usr/local/bin/php-gameboy
```

Running
-------

[](#running)

Your roms are loaded from the directory you are running the `php-gameboy` command.

```
$ php-gameboy drmario.gb
$ php-gameboy pokemon.gbc
```

If you like to run this emulator locally, simple clone the repository:

```
$ git clone https://github.com/gabrielrcouto/php-terminal-gameboy-emulator.git
$ cd php-terminal-gameboy-emulator
$ composer install -o
```

For running roms, pass the full path to your rom or put then in the `php-terminal-gameboy-emulator` folder:

```
$ bin/php-gameboy pokemon.gbc
$ bin/php-gameboy /full/path/to/your/rom/drmario.gb
```

Controls
--------

[](#controls)

```
_n_________________
|_|_______________|_|
|  ,-------------.  |
| |  .---------.  | |
| |  |         |  | |
| |  |         |  | |
| |  |         |  | |
| |  |         |  | |
| |  `---------'  | |
| `---------------' |
|   _               |
| _|W|_         ,-. |
||A   D|   ,-. "._,"|
|  |S|    "._," Dot |
|    _  _ Comma     |
|   // //           |
|  // //    \\\\\\  |
|  N  M      \\\\\\ ,
|________...______,"
```

- Left = A
- Up = W
- Down = S
- Right = D
- A = Comma (,)
- B = Dot (.)
- Select = N
- Start = M

Tests
-----

[](#tests)

You can use the following command to run the most common checks, such as `php -l`, `phpcs`:

```
$ ant check

```

TO-DO
-----

[](#to-do)

Converting from the JS paradigm was a lot of work, and I still need to adapt somethings like:

- Code standard - PSRs, please!
- Array of functions - Maybe in PHP it's not the best approach
- Pixel auxiliary array - Very CPU intensive to convert RGBA every time
- Classes - Core is too big!
- Profiling and otimizing - XHProf to find the most intensive functions
- Save/Restore - I need to save my Pokémon, please!

Credits
-------

[](#credits)

[@gabrielrcouto](http://www.twitter.com/gabrielrcouto)

Legal
-----

[](#legal)

The purpose of this project was to study all the capabilities of PHP.

It does not have any commercial or profitable intentions.

The user is responsible to use this code and its content in the terms of the law.

The author is completely against piracy and respects all the copyrights, trademarks and patents of Nintendo.

###  Health Score

36

↑

LowBetter than 83% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity41

Moderate usage in the ecosystem

Community30

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 69.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3679d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0e904e2d00a1391f421ba18af4e9e2826787ff02a93345828809472596f5fef9?d=identicon)[gabrielrcouto](/maintainers/gabrielrcouto)

---

Top Contributors

[![gabrielrcouto](https://avatars.githubusercontent.com/u/2197005?v=4)](https://github.com/gabrielrcouto "gabrielrcouto (63 commits)")[![henriquemoody](https://avatars.githubusercontent.com/u/154023?v=4)](https://github.com/henriquemoody "henriquemoody (9 commits)")[![reisraff](https://avatars.githubusercontent.com/u/4624214?v=4)](https://github.com/reisraff "reisraff (5 commits)")[![hasegawa-tomoki](https://avatars.githubusercontent.com/u/3850359?v=4)](https://github.com/hasegawa-tomoki "hasegawa-tomoki (4 commits)")[![emielmolenaar](https://avatars.githubusercontent.com/u/2470795?v=4)](https://github.com/emielmolenaar "emielmolenaar (3 commits)")[![pokemaobr](https://avatars.githubusercontent.com/u/1239099?v=4)](https://github.com/pokemaobr "pokemaobr (1 commits)")[![davelima](https://avatars.githubusercontent.com/u/6919540?v=4)](https://github.com/davelima "davelima (1 commits)")[![ucirello](https://avatars.githubusercontent.com/u/138827?v=4)](https://github.com/ucirello "ucirello (1 commits)")[![diegocpires](https://avatars.githubusercontent.com/u/3610897?v=4)](https://github.com/diegocpires "diegocpires (1 commits)")[![ikari7789](https://avatars.githubusercontent.com/u/1041215?v=4)](https://github.com/ikari7789 "ikari7789 (1 commits)")[![itsjw](https://avatars.githubusercontent.com/u/10774154?v=4)](https://github.com/itsjw "itsjw (1 commits)")[![mauri870](https://avatars.githubusercontent.com/u/10168637?v=4)](https://github.com/mauri870 "mauri870 (1 commits)")

---

Tags

consoleterminalemulatorgameboy

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/gabrielrcouto-php-terminal-gameboy-emulator/health.svg)

```
[![Health](https://phpackages.com/badges/gabrielrcouto-php-terminal-gameboy-emulator/health.svg)](https://phpackages.com/packages/gabrielrcouto-php-terminal-gameboy-emulator)
```

###  Alternatives

[symfony/console

Eases the creation of beautiful and testable command line interfaces

9.8k1.1B10.0k](/packages/symfony-console)[php-school/cli-menu

A command line menu helper in PHP

2.0k1.1M22](/packages/php-school-cli-menu)[recca0120/terminal

run laravel artisan command in web application

877409.4k2](/packages/recca0120-terminal)[php-tui/php-tui

Comprehensive TUI library heavily influenced by Ratatui

571637.0k4](/packages/php-tui-php-tui)[aplus/cli

Aplus Framework CLI Library

2301.7M5](/packages/aplus-cli)[splitbrain/php-cli

Easy command line scripts for PHP with opt parsing and color output. No dependencies

176801.1k27](/packages/splitbrain-php-cli)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
