Gameboy Emulator written in C++ for RPGMaker 2003 with custom toolchain to allow compiling and debugging.
Gameboy system emulator written in C++. Custom toolchain is used to run the emulator in unmodified RPG Maker 2003 Software. To allow debugging and implementation in stages, other projects are needed. First a tool is used to load a Gameboy ROM and convert it into a special XML format. It can also generate files for running the emulator in a special RPGMaker-like runtime written in C++, an EasyRPG project, or an RPG Maker 2003 project. The Code for the actual emulator is compiled into XML by using a simple and custom C++ compiler. All of this can be controlled from a cental and easy to use Commandline interface (CLI).
The only tool currently being worked on is GB2RPG. It loads the Gameboy file and can read each byte from it. Additionally the map file and maptree generation works. This software is still very early in development.
The other tools needed will be worked on in the following order:
- CppRPGEnv: To allow C++ code to be written against a RPG Maker like interface.
- Gameboy Emulator: Write the actual emulator using the interface given by CppRPGEnv.
- Main CLI (rpg2k3-gb): To allow ease of use of the entire toolset to generate a project and test the emulator.
- CppEC: To compile the emulator code into the xml format to start testing using EasyRPG first then the actual RPG Maker second.
- CMake: >= 3.10.
- lcf2xml: To implement custom toolchain.
- Easy RPG Player: For Testing/Debugging purposes, to run final project you can either use original RPG Maker 2003 or Easy RPG Player.
- SFML: To create the simple RPG Maker runtime.
- tinyxml: XMLParser used for custom toolchain.
- rapidxml: XMLParser used for custom toolchain.
- Dear ImGUI: Immediate mode GUI for C++.
- imgui-sfml: Official imgui integration for SFML.
This project requires original RPG Maker 2003 project files that cannot be shared for legal reasons. You can acquire the RPG Maker 2003 from Steam. Create a new project and Copy the following files into the data/templates/project folder: RPG_RT.exe, ultimate_rt_eb.dll.
The project uses CMake to compile and create all the software and tools necessary.
Project still in development and no illustrations are available.
The exact capabilities of the emulator will be determined when the project has matured more. My research shows, that Gameboy Color games might not be supported either because of memory constraints or the added color putting a restraint on rendering in the RPG maker.
To play gameboy software this tool was made to read a gameboy rom (.gb file) and convert it into a format that the RPG Maker 2003 can understand and to be used by the emulator. ROM data from the cartridge is setup in mapfiles (.lmu/.emu) and are added to the project map tree (.lmt/.emt). RAM data is setup in mapfiles and the project database (.ldb/edb). To finally run the files in a project the tool creates project folders for a custom C++ runtime, EasyRPG Player or RPG Maker 2003. The runtime and the EasyRPG project can be used to debug the code for different stages.
Simplified environment to run emulator code as C++ code for debugging purposes. It mimics the API that you find for RPG Maker 2003 events and implements only what is strictly necessary for the development of the emulator. It uses SFML as a backend for 2D rendering. It allows to debug the actual emulator outside of an RPG Maker or EasyRPG project.
Compiles C++-code of the emulator into a xml file which is a list of Common Events. These can then be added to a database file (.lbd/.edb) by using lcf2xml.
Indepth information about what was integrated from thirdparty software can be found in the thirdparty/README.md file.
Tools:
- lcf2xml from liblcf: convert RPG Maker Project Files to/from xml.
- Easy RPG Player: Run RPG Maker Projects on many platforms.
- tinyxml2: to read/write xml files in C++.
- rapidxml: to read/write xml files in C++.
- SFML: Simple runtime that allows 2D graphics, audio and networking.
- RPG Maker 2003: To run the projects on the original RPG Maker you can buy it on Steam.
- Dear ImGUI: Immediate mode GUI for C++.
- imgui-sfml: Official imgui integration for SFML.
Documentation:
- Pan Docs: Comprehensive Gameboy technical reference.
- Gameboy Opcodes.
- Gameboy SoC and Cartridge Reference.