Git Product home page Git Product logo

php-terminal-gameboy-emulator's People

Contributors

davelima avatar diegocpires avatar emielmolenaar avatar gabrielrcouto avatar hasegawa-tomoki avatar henriquemoody avatar ikari7789 avatar itsjw avatar mauri870 avatar pokemaobr avatar reisraff avatar ucirello avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

php-terminal-gameboy-emulator's Issues

ROM Files

Github is not the best place to store arbitrary binary files, especially not ones like Dr Mario, which may be violating copyright. I Know there are other sites, simply say get your own roms, and leave it at that.

"'stty' is not recognized as an internal or external command, operable program or batch file." when running on windows (Either MinGW and Windows CMD)

When running under windows I get stty is not recongnized error.

Raw Output :

C:\wamp\www\php-terminal-gameboy-emulator>php boot.php pokemon.rom
'stty' is not recognized as an internal or external command,
operable program or batch file.

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate
64 bytes) in C:\wamp\www\php-terminal-gameboy-emulator\src\GameBoy\Core.php on
line 2809

Call Stack:
0.0010 235568 1. {main}() C:\wamp\www\php-terminal-gameboy-emulator\bo
ot.php:0
0.0310 6304760 2. GameBoy\Core->start() C:\wamp\www\php-terminal-gamebo
y-emulator\boot.php:19
0.0360 14257776 3. GameBoy\Core->ROMLoad() C:\wamp\www\php-terminal-game
boy-emulator\src\GameBoy\Core.php:641
0.0360 14257952 4. GameBoy\Core->getTypedArray() C:\wamp\www\php-termina
l-gameboy-emulator\src\GameBoy\Core.php:734
0.0360 14258048 5. array_fill() C:\wamp\www\php-terminal-gameboy-emulato
r\src\GameBoy\Core.php:2809

Phar shouldn't be included in the repository

The phar file is the repository itself. Including it in the master branch is the same as including a duplicate of all the code, which is probably out of date. If you're installing the code via composer, the phar is useless as you would just execute the bin file directly, and ignore the phar.

-bash: php-gameboy: command not found

I'm new to PHP, saw this project on lifehacker and wanted to try it out. I installed composer, upgraded PHP to 7.0.4, followed all of the instructions in the readme and keep getting: "-bash: php-gameboy: command not found".

I'm guessing I have to edit my BASH profile to get the command to work, but I'm not sure how to do that, or if I'm leaving out an important step?

PHP8 JIT impact

This is not really an issue but I just want to point out how much of a difference PHP8 JIT has on this project.

When I've heard about PHP8 JIT and how it does not really seem to have an effect on most typical web applications, my head remembered this project. Now, to my surprise this emulator works out of the box with PHP8, I was totally prepared to fix stuff.

I've tested PHP8 using out of the box settings (no JIT whatsoever) with Pokemon. FPS were pretty good (60-100).

Enabling JIT via

opcache.enable_cli=1
opcache.jit=1255
opcache.jit_buffer_size=100M

more than doubles the FPS (200+) making Pokemon run way too fast to actually play it.

Damn JIT broke my Pokemon.

Memory size

I use Babun and when i run pokemon.rom i get this error :

PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 24 bytes) in /cygdrive/c/Users/averry/Documents/php-terminal-gameboy-emulator-master/src/GameBoy/Core.php on line 740

FPS Optimization

We can increase the FPS searching for performance bottlenecks.

After a research, I disabled the "scanLine" function, and the CPU emulation performance increased 2x. On other words: Let's improve what "scanLine" does.

I'm so sorry

That you had to deal with a monolithic god object. It was designed that way as a workaround for shitty browsers in the JavaScript version circa 2010.

Very CPU intersive to convert RGBA every time

Simply put, don't convert every time, one-time or over multiple iterations build an array, or object you can use to lookup values, it's going to be so much easier than computing anything to simply serialize the results somewhere, even if it's done at runtime costing RAM (assuming the GBA has 65536 colours or something insane like that).

[Proposal] Create a .ini to store some configurations

@reisraff suggested me a way to change the key mapping.

It will be nice to have some .ini file, were we can put the configs.

What is the best way to store the file?

  • Stored on a default folder (like ~/.config)
  • Stored on any place and passed via argument (--config config.ini)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.