Skip to content
Shingo INADA edited this page Jan 4, 2026 · 24 revisions

gdxsv wiki

Feel free to use it for personal surveys, summarizing survey results, etc.

Issues can be used for specific work or investigations that require cooperation.

Development

Recommended developer environments.

Windows

gdxsv
  • Visual Studio Code
  • go1.24 for windows
  • Git bash
  • MSYS2 MinGW gcc for CGO
flycast
Installing MinGW
  • Download MSYS2 from https://www.msys2.org/
  • Run MSYS2 MINGW and run following commands
  • pacman -Syu
  • pacman -S make mingw-w64-x86_64-gcc mingw-w64-x86_64-ccache mingw-w64-x86_64-cmake mingw-w64-x86_64-lua mingw-w64-x86_64-ninja mingw-w64-x86_64-SDL2 mingw-w64-x86_64-toolchain mingw-w64-x86_64-libcdio
  • Add C:\msys64\mingw64\bin to PATH

Build & Run gdxsv

  1. git clone this repository
  2. make install-tools to get code-gen tools.
  3. run make then bin/gdxsv is generated. (cgo required)
  4. run ./bin/gdxsv initdb then gdxsv.db is generated.
  5. edit build_run.sh to fix server address. (optional. dont edit port number.)
  6. run build_run.sh

flycast customized for gdxsv development

Update submodule or clone flycast gdxsv-dev branch.

  1. git submodule init
  2. git submodule update -r
  • Run Visual Studio 2022 and open flycast directory as a CMake project.

Debugging JIT Emulators in CLion

Problem

When debugging Flycast (a dynamic recompilation emulator) in CLion, excessive SIGSEGV signals from JIT code generation cause severe performance degradation.

Solution

Configure GDB to ignore specific signals with a two-step setup:

1. Home Directory Configuration

Create ~/.gdbinit:

set auto-load local-gdbinit on
add-auto-load-safe-path /

2. Project Directory Configuration

Create .gdbinit in project root:

handle SIGSEGV nostop noprint pass
handle SIGILL nostop noprint pass

Key Point

CLion does not execute project-specific .gdbinit files by default for security reasons. The home directory configuration is required to enable auto-loading of project-level GDB initialization files.

Connect to local server (DC version)

Currently, patchs are required for the game image to rewrite the server address. Edit dcpatch/patch.go to your local address, and run it to rewrite track03.bin.

Start Flycast and it should connect to your local server.

  1. Select 「通信対戦」 menu
  2. Input PILOT NAME and go on to next menu.
  3. Select 「登録情報変更」
  4. Fill with dummy user info and hit 「次のページ」 > 「進む」
  5. Input HN and hit 「登録」

PCSX2 customized for gdxsv development

This is not for playing games, but for developing gdxsv. We will need another solution to play the game.

Features:

GdxBP CustomBreakPoint

  • Set some pairs of r5900 address and C++ function on pcsx2 source.
  • These breakpoints are set after the game startup.
  • When the pc reaches a specific address, execution is stopped.
  • Call stack (with label) are printed on emuLog.txt
  • Then the registered function is called.
  • The game is automatically restarted.

In this function, we can read/write memory and registers. This allows us to replace in-game function dynamically.

Note that you may unintentionally resume when using regular breakpoints.

Modem Replacement

Using CustomBreakPoint, Skip modem recognition and PPP connection, and use winsock to communicate when functions related to Tcp sockets are called.

The implementation is quite unreasonable.

Connect to local server (PS2 version)

Run pcsx2 customized version. The patch 1187BBDF.pnach will be automatically loaded after game iso launched.

  1. Select 「通信対戦」 menu
  2. Input PILOT NAME
  3. Select 「モデムの認識」menu (A patch enable you to move network menu)
  4. Select 「登録情報変更」
  5. 「次のページ」 > 「進む」
  6. Input HN and hit 「登録」