Coder Social home page Coder Social logo

Comments (19)

nadavbh12 avatar nadavbh12 commented on August 23, 2024

Are you able to reproduce this on 1.1.0?

from retro-learning-environment.

yanpanlau avatar yanpanlau commented on August 23, 2024

Yes. I just re-install it via the following scripts:

git clone --branch 1.1.0 https://github.com/nadavbh12/Retro-Learning-Environment.git
cd Retro-Learning-Environment/
mkdir build && cd build
cmake -DUSE_SDL=ON -DBUILD_EXAMPLES=ON ..
make -j 4
cd ..
pip install .

from retro-learning-environment.

nadavbh12 avatar nadavbh12 commented on August 23, 2024

What's your setup?
Could you perhaps do a binary search and find the faulty commit causing the issue?

from retro-learning-environment.

yanpanlau avatar yanpanlau commented on August 23, 2024

I am running Ubuntu 14.04 and compile under gcc 4.9

In order to test the setup, I also installed ZSNES and I can run the ROM successfully.

Can you advice how to do a binary search and how to find the faulty commit?

steetfigher

from retro-learning-environment.

nadavbh12 avatar nadavbh12 commented on August 23, 2024

Since you got it to work under 1.0.2 I conclude there must have been a subsequant commit which broke it.
You can run git log to view the latest commits.
Run git checkout <commit id> to change to a previous commit. You can go back one by one and see which is the one the crashes. Or you can binary search through them to find it faster.

from retro-learning-environment.

yanpanlau avatar yanpanlau commented on August 23, 2024

I did few more test

  1. Neither RLE 1.0.2 or 1.1.0 works
  2. The ubuntu emulator ZSENS works (works)
  3. The another emulator retroarch works (works)
  4. The ALE environments https://github.com/mgbellemare/Arcade-Learning-Environment.git (works)
  5. From the debugger info, it seems it is related to the audio in RetroAgent.cpp (line 316)
    static size_t core_audio_sample_batch(const int16_t *data, size_t frames) {}

I have re-install it from fresh but it seems cannot solve the problem. Attached is my compile log file hope it can help you to find out the reason?

compile_log.txt

from retro-learning-environment.

nadavbh12 avatar nadavbh12 commented on August 23, 2024

I see that you've named your ROM test.sfc.

RLE requires that the ROM name be identical to the ROM name as defined in the .h file (an error message was added catching this in a later RLE version). So for mortal kombat that would be mortal_kombat.sfc .

Please try re-running this in version 1.0.2. It would also be better to run the sharedlibraryinterface example so we know the problem is within RLE or the emulator rather than with the Python interface.

Regarding 3. - which emulator did you use for SNES?
If the above doesn't work, try using it with SNES9x2010.

from retro-learning-environment.

yanpanlau avatar yanpanlau commented on August 23, 2024

Thanks for quick reply, here is how I run

./python_example.py Mortal_Kombat.sfc ../../snes9x2010/snes9x2010_libretro.so

I am using Ubuntu 14.04 in the previous setup


I just did a new test, I use another computer and re-format and install Ubuntu 16.04, and it works with RLE 1.0.2, but it won't work for RLE 1.1.0 or RLE 1.1.1

The error was like this (during pip install)

Processing /home/dickson/RLE
Installing collected packages: rle-python-interface
  Running setup.py install for rle-python-interface ... error
    Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-l48SiO-build/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-qNFFnm-record/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    cmake .. -DBUILD_EXAMPLES=OFF -DBUILD_PYTHON=ON
    CMake Error: The current CMakeCache.txt directory /tmp/pip-l48SiO-build/build/CMakeCache.txt is different than the directory /home/dickson/RLE/build where CMakeCache.txt was created. This may result in binaries being created in the wrong place. If you are not sure, reedit the CMakeCache.txt
    CMake Error: The source "/tmp/pip-l48SiO-build/CMakeLists.txt" does not match the source "/home/dickson/RLE/CMakeLists.txt" used to generate cache.  Re-run cmake with a different source directory.
    Error while running cmake
    
    ----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-l48SiO-build/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-qNFFnm-record/install-record.txt --single-version-externally-managed --compile" failed with error code 255 in /tmp/pip-l48SiO-build/

from retro-learning-environment.

nadavbh12 avatar nadavbh12 commented on August 23, 2024

In the newest version (not sure if 1.1.0 or 1.1.1) you no longer need to run the build command (cmake + make), setup.py does that for you.
Remove CMakeCache.txt and then run pip install . again.

from retro-learning-environment.

yanpanlau avatar yanpanlau commented on August 23, 2024

We are getting close. OK. On Ubuntu 16.04 + RLE 1.1.1 + Street Fighter II + USE_SDL == FALSE, it works!

./python_example.py Street_Fighter_II.sfc snes

But if I turn on the USE_SDL (to see the sound and graphics, I have the following error)

[Based upon the Arcade Learning Environment (A.L.E)]
[Powered by LibRetro]
Use -help for help screen.
terminate called after throwing an instance of 'std::runtime_error'
  what():  The key sound you are trying to set does not exist.

Aborted (core dumped)

(I can see the video under RLE 1.0.2 with USE_SDL == True)

from retro-learning-environment.

nadavbh12 avatar nadavbh12 commented on August 23, 2024

Well that seems to be a bug I found a few days back and forgot to push the fix.
Sorry about that.

from retro-learning-environment.

yanpanlau avatar yanpanlau commented on August 23, 2024

Hum...I tried the 7c6e062...but error remains the same

git clone https://github.com/nadavbh12/Retro-Learning-Environment.git
cd Retro-Learning-Environment/
sudo pip install --upgrade --no-deps --force-reinstall .
cd ~/Retro-Learning-Environment/doc/examples
./python_example.py Street_Fighter_II.sfc snes
R.L.E: Retro Learning Environment (version 1.1.1)
[Based upon the Arcade Learning Environment (A.L.E)]
[Powered by LibRetro]
Use -help for help screen.
terminate called after throwing an instance of 'std::runtime_error'
  what():  The key sound you are trying to set does not exist.

Aborted (core dumped)

from retro-learning-environment.

nadavbh12 avatar nadavbh12 commented on August 23, 2024

You're correct. I've updates the shared_library example but not the python example. Please try now after the newer fix.

from retro-learning-environment.

yanpanlau avatar yanpanlau commented on August 23, 2024

I just tried the newer fix.

However, there is no video screen come out....

We are 99.9% there.....

from retro-learning-environment.

nadavbh12 avatar nadavbh12 commented on August 23, 2024

Usually when using the Python interface the SDL screen isn't used.
If you want to use it you can edit setup.py and add `-DUSE_SDL=ON' to the Cmake args.

from retro-learning-environment.

yanpanlau avatar yanpanlau commented on August 23, 2024

Awesome! Finally it works!

Just curious, how to turn the sound on? It will be REALLY cool to have both screen and sound on at the same time

from retro-learning-environment.

nadavbh12 avatar nadavbh12 commented on August 23, 2024

Glad to hear it finally worked out.
We haven't implemented the sound yet, so I'm afraid it's not possible.

from retro-learning-environment.

nadavbh12 avatar nadavbh12 commented on August 23, 2024

I just gave it another look and it turned out to be rather easy to implement. So you can now enable sound by settings 'sound' to true.

from retro-learning-environment.

yanpanlau avatar yanpanlau commented on August 23, 2024

Awesome. I just test. It works perfectly! That's the best AI platform! wonderful work.

from retro-learning-environment.

Related Issues (20)

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.