项目介绍
这是一个基于C语言的GameBoy模拟器,使用CMake进行项目构建,有完整的代码仓库与视频教程。
相关链接
项目意义
- 作为游戏玩家和人类,实现童年梦想,满足好奇心和创造欲
- 作为计算机专业学生,在用代码模拟硬件的过程中,能够了解CPU、RAM、ROM、GPU、BUS、IO、Interrupt等计算机体系结构中的重要概念
- 作为求职者/从业者,在项目实操过程中,能够熟悉相关工具链、锻炼工程能力、提高解决问题能力
macOS编译启动流程
原始项目与ubuntu系统进行开发,作者附有windows启动教程,笔者习惯使用macOS,因此尝试了在macOS进行编译启动,也是成功的。笔者以5个游戏镜像实测,此模拟器成功运行了其中的一个:SuperMarioLand。以下为macOS编译启动的具体教程:
How to use on macOS
Deploy Env
- Machine: MacBook Air m1
- OS: macOS 14.2
- Compiler: Apple clang version 15.0.0 (clang-1500.1.0.2.5) from Apple’s default CommandLineTools
- Other requirements: Homebrew 4.2.0
setup:
- clone the repo to your local directory
|
|
- use cmake to construct the project
|
|
install the essesntial libraries with homebrew if cmake or make is not successful:
|
|
remember to delete the cmake cache before you start cmake or make again
|
|
- run the emulator
|
|
key modification that enable success build on mac
- add
include_directories("/opt/homebrew/include")in CMakeLists.txt
explaination:
- the dependencies
sdl2,sdl2_ttfandcheckare installed with homebrew, the original repo was desined to run on Linux and Windows therefore did not add homebrew include path in CMakeLists.txt