Skip to content
Josh Schreuder edited this page Oct 6, 2026 · 6 revisions

Intro

Since the decomp project began, contributors have had several driving factors and interests in decompiling the original game:

  • Game preservation
  • Understanding game logic and enemy behaviours in detail
  • Uncovering unused or deeply buried logic
  • Learning and fun

One secondary goal which has always been a question on many peoples' mind is "will there be a [PC] port?". Here we aim to answer some frequently asked questions about a SoTN port - it is non exhaustive so please drop by on Discord if you have any questions which are not answered here.

TLDR - current state

  • A working end to end port of the game based on the decomp does not currently exist. Anyone who tells you otherwise is incorrect
  • It is planned, but secondary to the decompilation work, which completion is required to be complete before a full port is complete.
  • There is no known release date or end date, for either the decompilation work or the porting work
  • Finishing decompilation does not mean a port will become immediately available, as they are two separate pieces of work

FAQ

When will the port be released !?!?!

  • See above! A working end to end port of the game does not currently exist.
  • We know the demand for a port is HUGE, but there is no release date at the moment, so please do not bug us about one.

How can I help with porting efforts?

  • If there is decompilation remaining, efforts are most useful there. Reach out on Discord and ask what you can assist with
  • For information on how to work on the port, see Development section below.

What will be possible via porting?

  • At the most basic level the goal is to natively compile the game to target platforms other than the original, such as Mac, PC, Linux
  • One big question that is always raised is around cut content - bringing PSP content to the PSX version, bringing Saturn content, making a "definitive" experience. This is something that is exciting and likely possible (with hard work)
  • Additional quality of life improvements may be investigated and possibly implemented, like unlocked framerates, faster load times, performance optimisation, widescreen content etc.
  • Modding of new content into the game at a deeper level than ever before - things like randomisers and mods already exist but have had limitations due to their need to find "code caves" and trampolines to insert new functionality into the game
  • Future goals may be to natively port the game to other platforms like other decompilation efforts have, such as Lego Island running on 3DS - all this depends on passionate people willing to put in the work!

Do you have any examples of what might be possible?

Note that none of these are "production ready" and are only presented here as examples of things which may be possible in future.

No seriously, how can I run the port?

  • A working end to end port of the game does not currently exist!!

Development

We are not distributing pre-compiled binaries - a copy of the game is required to run the port.

Building

If you did not do it yet, familiarize with the Build guide to generate a successful game build.

You can generate the port build with:

cmake -B build/pc -DCMAKE_BUILD_TYPE=Debug -DUSE_PLAYER_MARIA=1 && cmake --build build/pc

Run sotn and make sure that it starts.

# Run starting from the title screen
./build/pc/sotn --disk disks/sotn.us.cue

# Jump to a specified stage
./build/pc/sotn --disk disks/sotn.us.cue --stage nz0

# Play with any other character
./build/pc/sotn --disk disks/sotn.us.cue --stage nz0 --player 2

Adding a stage

First you need to tell Cmake it exists. Add a section like this to CMakeLists.txt with all the files relevant to the stage

set(SOURCE_FILES_STAGE_WRP
    src/pc/stages/stage_wrp.c
    src/st/wrp/d_1b8.c
...
    src/st/wrp/bss.c
)

And add it to the core files

set(SOURCE_FILES_SOTN
    ${SOURCE_FILES_STAGE_WRP} <- new
)

Try rebuilding.

Stubbing

Stubbing is a technique we use when we are missing code or data that we don't think is essential just yet, or to make incremental progress.

If a function calls another function, but it's not decompiled yet (there's an INCLUDE_ASM), we can simply put an empty version of it in src/pc/stubs.c

For example:

void func_801083BC(void) { NOT_IMPLEMENTED; }

We can do the same with missing data:

s32 D_800978B4;

It's best to import the actual data, unless it's bss, where you don't need to since it's all 0s anyway.

Typical Bugs

Incorrect Pointer Types

On PS1 u8* and s32 are equivalent and it works fine. On 64-bit platforms these are not the same and will result in a crash.

Uninitialized Pointers

On PS1, you can deference a null pointer and it may still work since there's no memory protection. Here's an example of this sort of bug https://github.com/Xeeynamo/sotn-decomp/blob/d9f9d9c79c393c17207e9660de7698065da0416c/src/boss/mar/AFC4.c#L38

Scratchpad Usage

The scratchpad is a special on-chip memory area on PS1. This doesn't exist on other platforms so you need to declare storage for the types. Here's an example https://github.com/Xeeynamo/sotn-decomp/blob/d9f9d9c79c393c17207e9660de7698065da0416c/src/dra/4A538.c#L1831

Struct alignment

Pointers are not the same length on 32-bit and 64-bit platforms. Any struct with pointers in it is going to have alignment problems. Here's an example of this sort of fix: https://github.com/Xeeynamo/sotn-decomp/blob/d9f9d9c79c393c17207e9660de7698065da0416c/include/primitive.h#L16

Tactics demos

--demo Overlay Boss / content
0 st0 Prologue (Richter vs Dracula)
1 bo0 Olrox
2 bo4 Doppleganger10
3 bo1 Granfaloon (Legion)
4 bo2 Werewolf & Minotaur
5 bo3 Scylla
6 nz0_demo Alchemy Lab (Slogra & Gaibon)
7 bo5 Hippogryph
8 rbo1 Beelzebub
9 dre Succubus
10 nz1_demo Clock Tower (Karasuman)
11 rbo0 Trevor / Grant / Sypha
12 rbo2 Death
13 bo7 Cerberus
14 bo6 Richter
15 rbo3 Medusa
16 rbo4 The Creature
17 lib_demo Long Library (Lesser Demon)
18 rbo5 Doppleganger40
19 rbo7 Akmodan II
20 rnz1_demo Reverse Clock Tower (Darkwing Bat)
21 rbo8 Galamoth
22–26 no0 Placeholder (no real demo)
27 rcen Shaft
28 rbo6 Dracula (final fight)
29–31 no0 Placeholder

Clone this wiki locally