hoons07 avatar

How-to-setup-mupen64plus

hoons07

Published: 13 Feb 2018 › Updated: 13 Feb 2018How-to-setup-mupen64plus

How-to-setup-mupen64plus

MarioKart를 자동 운전하기 위한딥러닝(Deep learning) 알고리즘을 개발하기 위해 다음이 필요하다.

  1. MarioKart emulator
  2. Emulator-알고리즘간 interface 소프트웨어
  3. 데이터 수집과 학습구조, 딥러닝 네트워크(Deep learning network)

먼저 MarioKart를 실행하기 위한 에뮬레이터를 설치하는 방법을 정리하였다.
github 등의 사이트에 자세히 잘 설명되어 있지만,
빌드가 잘되지 않는 경우가 있으므로 원작자의 설명 외에 추가로 수정해야 하는 부분을 추가하였다.

1. Requirements and Pre-requisites

  1. 개발 환경
    • OS: Windows 10 (or over)
    • IDE: Microsoft VisualStudio 2013 (or over)
    • Language: C/C++
    • git
    • python 3.x
    • tensorflow
    • numpy
    • openai gym
  2. 필요 라이브러리 (대부분 포함되어 있음)
    • boost library (설치 필요)
    • SDL
    • zlib
    • libpng
    • freetype 2

2. Source code 다운 받기

Powershell 또는 Command prompt를 실행하여 빌드할 경로로 이동한다. (예: C:\lib)

> C:
> mkdir lib
> cd lib
> mkdir mupen64plus
> cd mupen64plus

github에서 source code 가져오기

> git clone https://github.com/mupen64plus/mupen64plus-ui-console
> git clone https://github.com/mupen64plus/mupen64plus-core
> git clone https://github.com/mupen64plus/mupen64plus-input-sdl
> git clone https://github.com/mupen64plus/mupen64plus-audio-sdl
> git clone https://github.com/mupen64plus/mupen64plus-rsp-hle
> git clone https://github.com/mupen64plus/mupen64plus-video-rice
> git clone https://github.com/mupen64plus/mupen64plus-video-glide64mk2
> git clone https://github.com/mupen64plus/mupen64plus-win32-deps
> git clone https://github.com/mupen64plus/mupen64plus-ui-python

// 아래 repository들은 필요하지 않지만 같이 받아두면 쓸떼 없을 수도 있음
> git clone https://github.com/mupen64plus/mupen64plus-rsp-cxd4
> git clone https://github.com/mupen64plus/mupen64plus-rom
> git clone https://github.com/mupen64plus/mupen64plus-video-z64
> git clone https://github.com/mupen64plus/mupen64plus-video-arachnoid
> git clone https://github.com/mupen64plus/mupen64plus-rsp-z64
> git clone https://github.com/mupen64plus/mupen64plus-video-glide64

3. Mupen64plus 빌드하기

  1. 다음 경로에서 VisualStudio 솔루션 파일 열기 (mupen64plus-ui-console.sln)
    VS 버전이 높을 경우 업그레이드 하면 된다.

    ....\mupen664plus\mupen64plus_ui_console\projects\VisualStudio2013

  2. 프로젝트별 설정 수정
    • mupen64plus-win32-deps
      dependent library 중에 boost library가 포함되어 있다.
      포함된 버전은 VS2013 버전이므로 빌드시 에러가 발생할 수 있다.
      VS 및 OS 버전에 맞는 빌드를 다운받는다.

      https://sourceforge.net/projects/boost/files/boost-binaries/
      // 1.66 버전(2018.02.14기준 최신), 32비트 빌드, VS2017
      https://sourceforge.net/projects/boost/files/boost-binaries/1.66.0/
      다운받은 설치파일을 mupen64plus-win32-deps 경로로 복사, 실행하여 설치한다.

    • mupen64plus-video-glide64mk2
      변경된 boost library의 경로를 프로젝트 속성 화면에서 수정한다.

      구성: 모든 구성
      링커-일반-추가 라이브러리-편집: (boost library 설치 경로: boost_1_66_0)
      ......\mupen64plus-win32-deps\boost-1.57.0\lib
      -> ......\mupen64plus-win32-deps\boost_1_66_0\lib32-msvc-14.1

    • Release 모드에서 Build
      Link 에러가 발생할 경우, SDL 문제일 수 있으므로 SDL을 다시 빌드한다.

      https://www.libsdl.org/release/SDL-1.2.15-win32-x64.zip

4. mupen64plus 실행

  1. MarioKart64 rom 파일 추가
    인터넷 어딘가에서 받을 수 있음

    https://romsmania.com/roms/nintendo-64/mario-kart-64-v1-1-233292
    다운받은 rom 파일을 mupen64plus-ui-console.exe가 있는 경로로 복사한다.
    ....\mupen64plus-ui-console\projects\VisualStudio2013\Release

  2. Console 모드에서 mupen64plus 실행
    PowerShell 또는 Command Prompt를 실행하고 mupen64plus-ui-console.exe 경로로 이동한다.
    아래 명령어로 실행
    > mupen64plus-ui-console MarioKart64.z64
    

5. gym_mupun64plus 설치

TensorFlow, OpenAI gym과 연동하기 위해 gym_mupun64plus가 필요하다.
gym을 설치했다면 github에서 gym_mupun64plus을 가져와 설치하면 된다.
이때, mupen64plus-core 프로젝트가 필요하므로 
```
> cd  C:\lib\mupen64plus
> git clone https://github.com/kevinhughes27/gym-mupen64plus
> git clone https://github.com/kevinhughes27/mupen64plus-input-bot
```

6. TODO

  1. gym_mupun64plus 설치: https://github.com/kevinhughes27/gym-mupen64plus
  2. Python과 mupen64plus, tensorflow 연동
  3. TensorKart 적용하기: https://github.com/kevinhughes27/TensorKart

Leave How-to-setup-mupen64plus to:

Written by

Read more #mariokart posts


Best Posts From hoons07

We have not curated any of hoons07's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.

More Posts From hoons07