Batocera 新增超級瑪利歐64原生 Linux 版

超級瑪利歐64 Super Mario 64 PC Port 是一個非官方的移植版本,它來自於**反編譯(decompilation)**的 Super Mario 64 原始碼。該專案將遊戲的 N64 原始碼轉換為可在 Windows、Linux 和其他平台原生執行的 C 語言程式碼,最終編譯出可直接在 PC 上運行的版本,無需模擬器。

事先要求

  • 下載原生已編譯好的 Linux x64 原生程式。如日版 sm64.jp.f3dex2e。美版 sm64.us.f3dex2e 。請自行 google 搜尋
  • Batocera 系統。建議是最新 v41 版。其它版未測。

PC port 的特點包括

  • 不依賴模擬器
  • 支援高解析度(可達 4K)
  • 支援 60fps(甚至更高)
  • 可自訂控制器、鍵盤輸入
  • 支援多種 Mod(包括高解析度、加關卡、Ray tracing 等效果)
  • 移植至多平台:Windows、Linux

跟原本的 N64 版本比起來有什麼優點

特性N64 原版PC Port
畫質240p(低解析度)最多支援 4K
幀率約 30fps可達 60fps+
控制N64 手把支援鍵盤、滑鼠、現代手把
平台限制僅能在 N64 或模擬器上可原生執行於多平台
Mod 支援幾乎無廣泛支援 Mod 和自製關卡
音效品質壓縮音訊可使用無壓縮原始音效

安裝

ssh 進 batocera 系統後執行下列指令

mkdir -p /userdata/roms/ports/.data/sm64ex;
mkdir -p /userdata/roms/ports/.data/sm64ex/res;

把你找到的檔案用 winscp 或檔案總管連線 batocera share 目錄的方式 copy 到 /userdata/roms/ports/.data/sm64ex 裡頭。之後執行下方指令龻更權限

#如果你用的是日版
chmod 755  /userdata/roms/ports/.data/sm64ex/sm64.jp.f3dex2e
#如果你用的是美版
chmod 755  /userdata/roms/ports/.data/sm64ex/sm64.us.f3dex2e

目錄架構

目錄會看到起來像下圖

下一步用把下方程式貼到 windows 記事本並存成你要的檔名。如 sm64ex.sh

# These events will be executed before the game begins.
# Read the current directory this script is being executed from and save to variable DIR.
DIR="$(dirname "$(readlink -f "$0")")"

# Change the current directory to that of the game's data folder.
cd "${DIR}/.data/sm64ex"

# Show the mouse cursor. It's a good idea to first show it when setting up the game, in case it's needed. 
unclutter-remote -s
./sm64.jp.f3dex2e

# These events will be executed once the game terminates.
# Hide the mouse cursor as we are going back to ES.
unclutter-remote -h

把 N64Majora.sh 用 winscp 或檔案總管連線 batocera share 目錄的方式把它 copy 至 /userdata/roms/ports/ 並執行下方程式。如果你有換檔名記得把程式指令的 sm64ex.sh 也換成你的自定檔名

dos2unix /userdata/roms/ports/sm64ex.sh;
chmod 755 /userdata/roms/ports/sm64ex.sh;

執行

在 ES 更新一下遊戲列表或重開 Batocera . 之後可以 Ports 看到 sm64ex 的遊戲選項。點選執行。畫面

screenshot sm64ex

延伸閱讀

blog.ocam.live
blog.ocam.live

關注科技新聞、SEO、人工智慧、電玩模擬器、程式設言、與 IT 日常等議題,深入簡出文章的說明並持續追蹤相關新聞的發展與報導。