The origin of the previous story is very simple. I came across a retro console and thought back to my childhood memories. I wondered if I could run a simulator in Python and run a black and white game. In fact, just think about it, did not expect to tamp all the way, and finally really configured out a can operate east.

This is also using an existing Python library called PyBoy. I looked at the search engines and found that there were no serious efforts to write this module.

As a Popularizer of Python, I believe that people will use this library one day, and since no one is writing it, I will have to dream of eraser to popularize PyBoy. Of course, there are still a lot of bugs in this thing, such as installing SDL2 and not knowing how long it will take to roll over.

As a full-fledged Python library, find its Github address to see if it is available

Github.com/Baekalfen/P…

Very good, it was updated at least 8 days ago, again, the author is still active, at least learning is not a problem

Insert picture description here as browsing, found the problem, EMMM… English documents, for English level 12 I certainly have no problem

If you have any questions, or just want to chat, join us on Discord. If you have a question or want to chat, join Discord

It is highly recommended to read the report to get a light introduction to Game Boy emulation. But do be aware, that the Python implementation has changed a lot. The report is relevant, eventhough you want to contribute to another emulator, or create your own. You need to read the instructions carefully. If you want to contribute to the simulator or build your own, be aware that many implementations of Python will change.

If you’ve read the report and want more explicit details, have a look at the Pan Docs. If you want to learn more, take a look at Pan Docs

If you are looking to make a bot or AI, you can find all the external components in the PyBoy Documentation. There is also a short example on our Wiki page Scripts, AI and Bots as well as in the examples directory. If more features are needed, or if you find a bug, Don’t hesitate to make an issue here on GitHub, or write on our Discord channel. Well, it seems you can also do robotics and artificial intelligence

In fact, he made a Game Boy simulator. A Game Boy will be familiar to many people, especially boys, because it looks like this.

There are two important points missing in github home page installation plan, one is how to install windows10, the other is where to download gb games, today we supplement these two parts to complete.

Configuration SDL2 in Windows 10 above the first step to configure SDL2, here need to download a version of SDL2 – at least 2.0.10 version, the download link: download.csdn.net/download/hi… After downloading, unzip to a folder, remember the address, need to match the environment variables

You can configure it manually or through the command line interface

Your setx PYSDL2_DLL_PATH D: \ SDL2 \ SDL2-2.0.10 \ lib \ x64

Manual configuration insert picture description here

Common ERRORS in CONFIGURING SDL2 The following figure shows that the SDL2 version is incorrect. Replace the 2.0.10 version and insert the description here

The following figure shows that the environment variables are not correctly configured, so you can continue to modify them. Note that after modifying the environment variables, you need to restart the development tool. For example, I used PyCharm, and restart the software

Install PyBoy by command installation, network speed is not good switch domestic source

python -m pip install –user pyboy

Write codes to test whether the environment is correctly configured. If no error is reported, everything is normal and you can continue operations

from pyboy import PyBoy

Download GB game program after a search, I found a pile, you can go to download it

share.weiyun.com/5MqhGqJ password hcoi60 thanks to resource providers, a lot of games played by teenagers.

The core code code part is very simple, the key part we still put on the configuration and research of this open source program

from pyboy import PyBoy pyboy = PyBoy(‘ROMs/3 Choume no Tama.gb’) while not pyboy.tick(): Pass 1, 2, 3, 4, 5 Note that I created a new folder in the root directory of the project and placed a GB file in ROMs. This file needs to be downloaded and placed by you

About the operation of software

GameBoy keystroke Up Up Down Down Left Left Right Right A A S B Return Start Backspace Select Github.com/Baekalfen/P…

Written in Python behind open source library is always full of surprises, when running the code, there is no error, a childhood game window appears, as if their dialogue with the past, from a distance the window in the 20 years ago to oneself is so magical, every afternoon, every school, each picked up a GB machine, together with three friends, and the up and down or so ABAB, Now that I think about it, it was a blessing.

Hopefully this library will refresh your memory

If you want to build a relationship with a blogger, you can follow the blogger, or follow the blog account “Non-undergraduate Programmer” to learn how a non-undergraduate programmer grows up. Blogger ID: Dream eraser, hope you like, comment, favorites

Reprinted by: Dream Eraser source: CSDN