Gameboy.Live —— Go 编写的 Gameboy 模拟器
Gameboy.Live是一个 Gameboy 模拟器 ,Go 语言开发,主要用于学习目的。你可以在桌面电脑上玩一些简单的 Gameboy 游戏。 也可以通过终端来玩“云游戏”: telnet gameboy.live 1989 安装 可直接下载可执行程序,或者通过源码进行构建。要求至少是 Go 1.11 版本。在 Debian 系列系统中需要先安装libasound2-dev和libgl1-mesa-dev包: git clone https://github.com/HFO4/gameboy.live.git cd gameboy.live go build -o gbdotlive main.go 使用 Usage of gbdotlive: -c config Set the game option list config file path -d Use Debugger in GUI mode -f FPS Set the FPS in GUI mode (default 60) -g Play specific game in GUI mode (default true) -h This help -m Turn on sound in GUI mode (default true) -p port Set the port for the cloud-gaming server (default 1989) -r ROM Set ROM file path to be played in GUI mode -s Start a cloud-gaming server GUI 模式 可在 GUI 模式先直接玩一个指定的 ROM 文件: gbdotlive -r "Tetris.gb" 设置云游戏服务器 你可以使用云游戏服务的方式来运行Gameboy.Live,玩家通过 telnet 登录到服务器指定端口,无需安装额外软件。 使用该模式运行需要一个gamelist.json配置文件来指定游戏的参数,配置示例: [{ "Title": "Tetris", "Path": "test.gb" }, { "Title": "Dr. Mario", "Path": "Dr. Mario (JU) (V1.1).gb" }, { "Title": "Legend of Zelda - Link's Awakening", "Path": "Legend of Zelda, The - Link's Awakening (U) (V1.2) [!].gb" }] 在将 POM 放入配置之前请先测试。 接下来启动Gameboy.Live服务并指定配置即可: gbdotlive -s -c "gamelist.json" 成功运行后会有类似以下的输出: 2019/04/30 21:27:56 Listen port: 1989 现在你可以在其他机器中玩游戏,游戏的模拟和渲染过程是在服务器端完成的。 telnet <ip of your server>:<port> "云游戏" 只支持使用 ANSI 和 UTF-8 编码的终端方式,在 Windows 下可以使用 WSL 替代 CMD。 调试 Gameboy.Live提供一个简单的内建调试器,要开启调试模式需要设置 d 参数为 true: gbdotlive -r "test.gb" -d=true [OP:NOP] AF:01B0 BC:0013 DE:00D8 HL:014D SP:FFFE PC:0100 LCDC:91 IF:E1 IE:00 IME:false LCD:100 键盘指令 Keyboard Gameboy Enter Start Backspace Select ↑ Up ↓ Down ← Left → Right X B Z A 特性 & TODOs CPU 指令仿真 定时器和中断 支持 ROM-only, MBC1, MBC2, MBC3 cartridge 声音仿真 图形仿真 云游戏 ROM 调试器 Testing