Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running on RaspberryPi 4B error #119

Closed
yoyojacky opened this issue Apr 21, 2020 · 8 comments
Closed

Running on RaspberryPi 4B error #119

yoyojacky opened this issue Apr 21, 2020 · 8 comments

Comments

@yoyojacky
Copy link

yoyojacky commented Apr 21, 2020

pi@raspberrypi:~/PyBoy $ python3 -m pyboy ../mario.nes
1399     __main__                       INFO
The Game Boy controls are as follows:

| Keyboard key | GameBoy equivalant |
| ---          | ---                |
| Up           | Up                 |
| Down         | Down               |
| Left         | Left               |
| Right        | Right              |
| A            | A                  |
| S            | B                  |
| Return       | Start              |
| Backspace    | Select             |

The other controls for the emulator:

| Keyboard key | Emulator function       |
| ---          | ---                     |
| Escape       | Quit                    |
| D            | Debug                   |
| Space        | Unlimited FPS           |
| Z            | Save state              |
| X            | Load state              |
| I            | Toggle screen recording |
| ,            | Rewind backwards        |
| .            | Rewind forward          |

See "pyboy --help" for how to enable rewind and other awesome features!

Segmentation fault

pi@raspberrypi:~/PyBoy $ pip3 list
Package           Version
----------------- -----------
appdirs           1.4.3
asn1crypto        0.24.0
astroid           2.1.0
asttokens         1.1.13
automationhat     0.2.0
beautifulsoup4    4.7.1
blinker           1.4
blinkt            0.1.2
buttonshim        0.0.2
Cap1xxx           0.1.3
certifi           2018.8.24
chardet           3.0.4
Click             7.0
colorama          0.3.7
colorzero         1.1
cookies           2.2.1
cryptography      2.6.1
cycler            0.10.0
Cython            0.29.16
decorator         4.3.0
docutils          0.14
drumhat           0.1.0
ecdsa             0.13
entrypoints       0.3
envirophat        1.0.0
ExplorerHAT       0.4.2
Flask             1.0.2
fourletterphat    0.1.0
gpiozero          1.5.1
guizero           0.6.0
html5lib          1.0.1
idna              2.6
ipykernel         4.9.0
ipython           5.8.0
ipython-genutils  0.2.0
isort             4.3.4
itsdangerous      0.24
jedi              0.13.2
Jinja2            2.10
jupyter-client    5.2.3
jupyter-core      4.4.0
keyring           17.1.1
keyrings.alt      3.1.1
kiwisolver        1.0.1
lazy-object-proxy 1.3.1
logilab-common    1.4.2
lxml              4.3.2
MarkupSafe        1.1.0
matplotlib        3.0.2
mccabe            0.6.1
microdotphat      0.2.1
mote              0.0.4
motephat          0.0.3
mypy              0.670
mypy-extensions   0.4.1
nudatus           0.0.4
numpy             1.16.2
oauthlib          2.1.0
olefile           0.46
pantilthat        0.0.7
parso             0.3.1
pathlib           1.0.1
pexpect           4.6.0
pgzero            1.2
phatbeat          0.1.1
pianohat          0.1.0
picamera          1.13
pickleshare       0.7.5
picraft           1.0
piglow            1.2.5
pigpio            1.44
Pillow            5.4.1
pip               20.0.2
prompt-toolkit    1.0.15
psutil            5.5.1
pyaes             1.6.1
pyboy             1.0.0
pycairo           1.16.2
pycodestyle       2.4.0
pycrypto          2.6.1
pyflakes          2.0.0
pygame            1.9.4.post1
Pygments          2.3.1
PyGObject         3.30.4
pyinotify         0.9.6
PyJWT             1.7.0
pylint            2.2.2
pyOpenSSL         19.0.0
pyparsing         2.2.0
PySDL2            0.9.7
pyserial          3.4
python-apt        1.8.4.1
python-dateutil   2.7.3
pyudev            0.22.0
pyxdg             0.25
pyzmq             17.1.2
qtconsole         4.3.1
rainbowhat        0.1.0
requests          2.21.0
requests-oauthlib 1.0.0
responses         0.9.0
roman             2.0.0
RPi.GPIO          0.7.0
rshell            0.0.27
RTIMULib          7.2.1
scrollphat        0.0.7
scrollphathd      1.2.1
SecretStorage     2.3.1
semver            2.0.1
Send2Trash        1.5.0
sense-emu         1.1
sense-hat         2.2.0
setuptools        40.8.0
simplegeneric     0.8.1
simplejson        3.16.0
six               1.12.0
skywriter         0.0.7
sn3218            1.2.7
soupsieve         1.8
spidev            3.4
ssh-import-id     5.7
thonny            3.2.6
tornado           5.1.1
touchphat         0.0.1
traitlets         4.3.2
twython           3.7.0
typed-ast         1.3.1
uflash            1.2.4
unicornhathd      0.0.4
urllib3           1.24.1
wcwidth           0.1.7
webencodings      0.5.1
websockets        8.1
Werkzeug          0.14.1
wheel             0.32.3
wrapt             1.10.11

pi@raspberrypi:~/PyBoy $ python3 -V
Python 3.7.3
pi@raspberrypi:~/PyBoy $ uname  -a
Linux raspberrypi 4.19.97-v7l+ #1294 SMP Thu Jan 30 13:21:14 GMT 2020 armv7l GNU/Linux
pi@raspberrypi:~/PyBoy $
pi@raspberrypi:~/PyBoy $ lsb_release -a
No LSB modules are available.
Distributor ID: Raspbian
Description:    Raspbian GNU/Linux 10 (buster)
Release:        10
Codename:       buster
pi@raspberrypi:~/PyBoy $
pi@raspberrypi:~/PyBoy $ free -m
              total        used        free      shared  buff/cache   available
Mem:           1939         137        1018          34         783        1677
Swap:            99           0          99
pi@raspberrypi:~/PyBoy $

Compile from your repository, and running with an nintendo game rom called : mario.nes
Dose it support Nintendo or just fit for gameboy?(GB) ?

@yoyojacky
Copy link
Author

yoyojacky commented Apr 21, 2020

python3 -m pyboy ../sonic3dblast5.gb
1248     __main__                       INFO
The Game Boy controls are as follows:

| Keyboard key | GameBoy equivalant |
| ---          | ---                |
| Up           | Up                 |
| Down         | Down               |
| Left         | Left               |
| Right        | Right              |
| A            | A                  |
| S            | B                  |
| Return       | Start              |
| Backspace    | Select             |

The other controls for the emulator:

| Keyboard key | Emulator function       |
| ---          | ---                     |
| Escape       | Quit                    |
| D            | Debug                   |
| Space        | Unlimited FPS           |
| Z            | Save state              |
| X            | Load state              |
| I            | Toggle screen recording |
| ,            | Rewind backwards        |
| .            | Rewind forward          |

See "pyboy --help" for how to enable rewind and other awesome features!

Traceback (most recent call last):
  File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/pi/PyBoy/pyboy/__main__.py", line 154, in <module>
    main()
  File "/home/pi/PyBoy/pyboy/__main__.py", line 122, in main
    pyboy = PyBoy(argv.ROM, **vars(argv))
  File "pyboy/pyboy.py", line 64, in pyboy.pyboy.PyBoy.__init__
    self.mb = Motherboard(
  File "pyboy/core/mb.py", line 28, in pyboy.core.mb.Motherboard.__init__
    self.cartridge = cartridge.load_cartridge(gamerom_file)
  File "pyboy/core/cartridge/cartridge.py", line 24, in pyboy.core.cartridge.cartridge.load_cartridge
    def load_cartridge(filename):
  File "pyboy/core/cartridge/cartridge.py", line 30, in pyboy.core.cartridge.cartridge.load_cartridge
    external_ram_count = int(EXTERNAL_RAM_TABLE[rombanks[0][0x0149]])
KeyError: 32

@krs013
Copy link
Collaborator

krs013 commented Apr 21, 2020

PyBoy currently only works for Gameboy games and Gameboy Color games that are backward compatible with the Gameboy. NES games won't work on it; NES games are quite different.

Sonic 3D Blast 5 is a Gameboy game, but it looks like it uses an unusual MBC code, which is what causes the error. Apparently it's an unofficial game of some sort? This can probably be fixed with a simple update, like Gearboy does: https://github.com/drhelius/Gearboy/blob/master/src/Cartridge.cpp#L328

Whether that's a change we want to introduce will be up to Baekalfen, so I'll leave this here for him to see.

Also, when pasting terminal output into messages on GitHub, you should put ``` before and after, so it's formatted like you see after my edit.

@krs013
Copy link
Collaborator

krs013 commented Apr 21, 2020

Looking more closely at the game, it seems like it might take more than a simple hack to get it working. As a bootleg game, its headers do not match its contents at all, and even adjusting for that, I can't find a way to make it run. There seems to be very little technical information about the game online as well. Perhaps someday PyBoy can have extra tools for cartridge introspection and debugging, but for now I'd say that it would be more work than it's worth to support.

Sorry, I don't think PyBoy can run this game.

@Baekalfen
Copy link
Owner

If Sonic 3D Blast 5 is a bootleg game, which requires a lot of hacks to get working, I don't think it's something we want to support at this moment. If somebody want to make a PR for it, and it's not too disruptive, we might merge it in.

@yoyojacky
Copy link
Author

PyBoy当前仅适用于与Gameboy向后兼容的Gameboy游戏和Gameboy Color游戏。NES游戏无法正常运行;NES游戏完全不同。

Sonic 3D Blast 5是一款Gameboy游戏,但看起来它使用了不寻常的MBC代码,这是导致错误的原因。显然,这是某种非官方的游戏吗?可以通过简单的更新来解决此问题,例如Gearboy:https//github.com/drhelius/Gearboy/blob/master/src/Cartridge.cpp#L328

我们是否要引入这种变化将取决于贝卡尔芬,所以我将其留给他看看。

另外,在将终端输出粘贴到GitHub上的消息中时,您应该在前后放置```,因此其格式设置就像您编辑后看到的一样。

Hi Bro, thanks for your help and I am trying to find another rom for pyboy, and I will send more feedback to you~ have a nice day~

@yoyojacky
Copy link
Author

如果Sonic 3D Blast 5是一款盗版游戏,需要大量的技巧才能正常工作,我现在不希望这是我们要支持的东西。如果有人想为此做一个公关,但又不太破坏性,我们可以将其合并。

hi Baekalfen,
Sorry for that, I just want to try this repository on my raspberry Pi 4B, but I did not find origin rom of the game so that I download the sonic 3D Blast 5 from internet, it does not work. Do you have any suggestion of the rom?

@Baekalfen
Copy link
Owner

We cannot help you finding ROMs. We do not want piracy to be associated with this project.

@yoyojacky
Copy link
Author

We cannot help you finding ROMs. We do not want piracy to be associated with this project.

OK, thanks for your reply, I see. keep up! have a nice day~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants