nintengo

一个用 Go 编写的 NES 模拟器。(An NES emulator written in Go)

  • 所有者: nwidger/nintengo
  • 平台: Linux, Mac, Windows
  • 許可證: GNU General Public License v2.0
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

nintengo

一个用 Go 编写的 NES 模拟器。

构建

Mac OS X/Linux/Windows

按照你的平台的官方安装说明安装 Azul3D。

go get -u github.com/nwidger/nintengo

WebAssembly

WebAssembly 支持需要 Go 1.11 或更高版本。

  1. 下载 nintengo
    go get -d -u github.com/nwidger/nintengo    
  2. 构建 wasm/nintengo.wasm
    <code>cd $GOPATH/src/github.com/nwidger/nintengo
    GOOS=js GOARCH=wasm go build -o wasm/nintengo.wasm .
    </code>
        
  3. 启动运行在 8000 端口的 web 服务器
    <code>cd $GOPATH/src/github.com/nwidger/nintengo/wasm
    go run serve.go -http :8000
    </code>
        
  4. 在浏览器中打开 http://localhost:8000 in your browser. Press the Choose File 按钮,选择要运行的 .nes 文件。

使用方法

nintengo OPTIONS FILE
FILE can be a .nes file or a .nes file inside a .zip archive
  -audio-recorder="": recorder to use: none | wav
  -connect="": Connect to address as slave, <rom-file> will be ignored (e.g., 'localhost:8080')
  -cpu-decode=false: decode CPU instructions
  -cpu-profile="": write CPU profile to file
  -http="": HTTP service address (e.g., ':6060')
  -listen="": Listen at address as master (e.g., ':8080')
  -mem-profile="": write memory profile to file
  -recorder="": recorder to use: none | jpeg | gif
  -region="NTSC": system region to emulate: NTSC | PAL

控制(键)

z - A
x - B
Enter - 开始
右Shift - 选择
箭头键 - 上/下/左/右
p - 暂停/不暂停
n - 用p按周期/扫描线/帧切换步进。
r - 重置
q - 退出
F1 - 保存状态
F5 - 负载状态
F8 - 200% FPS (2倍快进)
F9 - 100% FPS
F10 - 75% FPS
F11 - 50% FPS
F12 - 25% FPS
` - 切换过扫描
1 - 256x240屏幕尺寸
2 - 512x480屏幕尺寸
3 - 768x720屏幕尺寸
4 - 1024x960屏幕尺寸
5 - 2560x1440屏幕尺寸
9 - 显示/隐藏背景
0 - 显示/隐藏精灵
小键盘0 - 切换所有通道的静音功能。
小键盘1 - 切换静音脉冲1通道
小键盘2 - 切换静音脉冲2通道
小键盘3 - 切换静音三角通道
小键盘4 - 切换静音通道
小键盘5 - 切换静音DMC通道。
l - 将图案表保存到左/右.jpg。
o - 切换CPU解码
i - 切换PPU解码
with -recorder=gif:
s - 开始录制到frame.gif
d - 停止记录
with -recorder=jpeg。
s - 将截图保存为frame.jpg
with -audio-recorder=wav:
小键盘-(减号)-- 开始录音到 audio.wav。
小键盘+(+) -- 停止录音。

支持

音频支持目前正在进行中。所有的音频通道都能以某种方式工作。

实现了电池备份保存,并以 .sav 文件扩展名保存到磁盘。

支持保存状态,并以 .nst 文件扩展名保存到磁盘。

Netplay

Nintengo 支持双人网络游戏,使用 -listen 和 -connect 命令行参数。使用时,玩家一启动 nintengo 并使用 -listen 标志让它侦听输入的连接。

nintengo -listen=:8080 FILE

然后玩家二使用 -connect 标志连接到玩家一,提供服务器的主机/端口。

nintengo -connect=192.168.1.110:8080

注意,玩家二不需要提供 FILE 参数。

Mappers

  • NROM
  • MMC1
  • UNROM
  • CNROM
  • MMC3
  • ANROM
  • MMC2

鸣谢

如果没有NE Sdev Wiki 和 EFnet 上 #nesdev 的好朋友们,这个项目是不可能完成的。

能够阅读其他 NES 模拟器的源代码也是非常有帮助的。以下是我最常参考的一个简短列表,尽管它可能不是完整的列表。


(The first version translated by vz on 2020.08.22)

主要指標

概覽
名稱與所有者nwidger/nintengo
主編程語言Go
編程語言Makefile (語言數: 4)
平台Linux, Mac, Windows
許可證GNU General Public License v2.0
所有者活动
創建於2014-01-21 01:26:23
推送於2020-09-19 17:45:15
最后一次提交2019-02-17 10:27:56
發布數1
最新版本名稱v0.1-alpha (發布於 )
第一版名稱v0.1-alpha (發布於 )
用户参与
星數1.3k
關注者數31
派生數52
提交數266
已啟用問題?
問題數5
打開的問題數3
拉請求數16
打開的拉請求數0
關閉的拉請求數1
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?

nintengo

Build Status

An NES emulator written in Go

Super Mario Bros.

Donkey Kong

Excitebike

Legend of Zelda

Punch-Out!

Super Mario Bros. 3

Mega Man 2

Build

Mac OS X/Linux/Windows

  1. Install Azul3D by following the official
    installation instructions for your
    platform.

  2. go get -u github.com/nwidger/nintengo

WebAssembly

WebAssembly support requires Go 1.11 or higher.

  1. Download nintengo

    go get -d -u github.com/nwidger/nintengo
    
  2. Build wasm/nintengo.wasm

    cd $GOPATH/src/github.com/nwidger/nintengo
    GOOS=js GOARCH=wasm go build -o wasm/nintengo.wasm .
    
  3. Start web server running on port 8000

    cd $GOPATH/src/github.com/nwidger/nintengo/wasm
    go run serve.go -http :8000
    
  4. Open http://localhost:8000 in your browser. Press the Choose File button and select a .nes file to run.

Usage

nintengo OPTIONS FILE
FILE can be a .nes file or a .nes file inside a .zip archive
  -audio-recorder="": recorder to use: none