gabrielrcouto / php-terminal-gameboy-emulator Goto Github PK
View Code? Open in Web Editor NEWA PHP Terminal GameBoy Emulator
A PHP Terminal GameBoy Emulator
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.
The symfony container providing a interface for handle with commands easy and functional, no changes on core must be made, the wrapper of the application will be changed
The copyrighted roms still exist in the commit history. The GBA boot rom was removed properly, but the rom data still exists. Need to use bfg on the three roms and re-upload the repository.
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
On the Downloads section of a release would be nice if you upload the PHAR archive.
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.
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?
How about branch/seperated repo with zephir version? What is zephir you may ask - language to write extensions for php in simple way without knowing C https://github.com/phalcon/zephir
Perhaps "boot.php" may have a warning about that before start to execute.
I'm getting the following error when trying to run a game:
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 268435464 bytes) in phar:///Users/23-Seconds/.binaries/gameboy/php-terminal-gameboy-emulator/src/Core.php on line 264
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.
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
:(
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.
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.
Create an executable PHAR archive to allow using it as an stand-alone program.
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).
@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?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.