3.5 KiB
Development
This document is intended for developers interested in contributing to segatools. Please read this document before you start developing/contributing.
Goals
We want you to understand what this project is about and its goals. The following list serves as a guidance for all developers to identify valuable contributions for this project. As the project evolves, these goals might do as well.
- Allow running Sega arcade (rhythm) games on arbitrary hardware
- Emulate required software and hardware features
- Provide means to cope with incompatibility issues resulting from using a different software platform (e.g. version of Windows).
- Provide an API for custom interfaces and configuring fundamental application features
Development environment
The following tooling is required in order to build this project.
Tooling
Linux / MacOSX
- git
- make
- mingw-w64
- docker (optional)
On MacOSX, you can use homebrew or macports to install these packages.
Windows
TODO
IDE
Ultimately, you are free to use whatever you feel comfortable with for development. The following is our preferred development environment which we run on a Linux distribution of our choice:
- Visual Studio Code with the following extensions
- C/C++
- C++ Intellisense
Further tools for testing and debugging
- Debugger: Can be part of your reverse engineering IDE of your choice or stand-along like OllyDbg
- apitrace: Trace render calls to graphics APIs like D3D and OpenGL. This tool allows you to record and re-play render calls of an application with frame-by-frame debugging. Very useful to analyze the render pipeline or debug graphicial glitches
Building
The root Makefile
contains various targets that allow you to build the project easily.
Local build
For a local build, you need to install Meson and a recent build of MinGW-w64. Then you can start the build process:
make build
Build output will be located in build/build32
and build/build64
folders.
Cleanup local build
make clean
Create distribution package (zip file)
make dist
The output will be located in build/zip
.
Build and create distribution package using docker
You can also build using docker which avoids having to setup a full development environment if you are just interested in building binaries of the latest changes.
This will also work on WSL2
If you don't have installed docker,you can run these commands
curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.sh
When it install finished,we can build segatools in docker
git clone <segatools Repo> <folder>
cd /path/to/segatools
docker build -t segatools-build .
docker run -v /path/to/segatools:/segatools segatools-build
Once completed successfully, the build output will be located in build/build32
build/build64
and build/zip
folders in your real folder
Now you can delete your build image when you build complete,this will not affect your files
docker rmi -f segatools-build
Building with Docker Desktop on Windows
- Install WSL2
- Install Docker Desktop
- Run Docker Desktop to start the Docker Engine
- Open a command prompt (
cmd.exe
) andcd
to yoursegatools
folder - Run
docker-build.bat
- Once completed successfully, build output is located in the
build/docker/zip
sub-folder.