在Ubuntu下利用SimpleNES-master运行超级玛丽
一、下载源码
git clone https://github.com/amhndu/SimpleNES.git
二、安装依赖
1、安装SFML库
sudo apt-get install libsfml-dev
2、安装Cmake
参考:https://zhuanlan.zhihu.com/p/519732843
3、安装c++的编译器
sudo apt install build-essential
三、编译SimpleNES-master源码
将SimpleNES-master文件夹放到Ubuntu系统中,进入该文件夹:
cd SimpleNES-master
创建build文件夹:
mkdir build/ && cd build/
运行:
cmake -DCMAKE_BUILD_TYPE=Release ..
make -j4 #Replace 4 with however many cores you have to spare
这样就编译好了
四、下载nes游戏
1、可以参考这个开源项目里面分享的链接:
https://gitee.com/zhendongdong/SimpleNes#https://gitee.com/link?target=https%3A%2F%2Fpan.baidu.com%2Fs%2F1ZrlJUlbGcOs4CDalehkXnw
2、可以在官网搜索下载nes的游戏:
https://wowroms.com/en/roms/super-nintendo/super-mario-world-usa/29592.html
五、使用SimpleNES运行游戏:
进入build文件夹可以看到这个SimpleNES文件,把下载的游戏放到同一目录下,在终端运行命令即可:
./SimpleNES Super\ Mario\ Bros.\ \(World\).nes
参考链接:
https://blog.csdn.net/SCHOLAR_II/article/details/120314783
https://blog.csdn.net/dai__liang/article/details/111304212