MCPcopy Index your code
hub / github.com/DCNick3/shin

github.com/DCNick3/shin @v0.8.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.8.1 ↗ · + Follow
3,514 symbols 9,932 edges 353 files 202 documented · 6%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

This is an attempt at an unofficial re-implementation of game engine used by some visual novels released by Entergram on Nintendo Switch, PS4 and PS Vita.

Currently known games using the engine on Switch and PS Vita are listed in this spreadsheet. PS4 was not researched yet.

If you know more - let me know! (dcnick3 on Discord)

Status

The initial implementation is focused on running switch version of Umineko no Naku Koro ni Saku \~Nekobako to Musou no Koukyoukyoku\~ (title id 01006A300BA2C000), with the intention to support other games in the future.

As of writing, most of the basic game functionality works:

  • Character sprites
  • Backgrounds
  • BGM & SFX
  • Text

However, there are still a lot of missing advanced features. It's not fully playable yet.

The intent is to follow the engine as closely as possible, so that it can be used to run the original games.

screenshot.png

Try it

You can try out the engine by downloading a pre-built binary from the releases page.

Select the latest release, and download the shin archive for your platform and extract it somewhere.

Then you would need to have romfs of Umineko no Naku Koro ni Saku \~Nekobako to Musou no Koukyoukyoku\~ game (title id 01006A300BA2C000).

It can be dumped from the switch using nxdumptool.

You can use hactoonet to dump the romfs from the game:

hactoolnet -t pfs0 "Umineko no Naku Koro ni Saku ~Nekobako to Musou no Koukyoukyoku~ [01006A300BA2C000].nsp" --romfs=assets

In the assets directory you should find a data.rom file. It's sha256sum should be 6d90eb0bacacf769a7e4634407622b047acd711c47debb28136d7bab3fd0e591.

You can put then put the assets directory next to the executable or another location documented here

Then you try running the game.

Controls are:

  • Mouse click, space, enter - advance text
  • Ctrl - fast-forward text
  • Escape, Q - quit
  • F3 - show overlay menu
  • F10 - resize to 1080p
  • F11 - toggle fullscreen

If you encounter any problems, please open an issue on GitHub.

Docs

While there is no comprehensive documentation of the engine, as I reverse engineer it, I try to document the findings mainly in this spreadsheet

The autogenerated docs can be found here.

What else is in the box

Aside from the game engine, this repo also includes shin-core - a library for working with the game data.

There is also sdu - a CLI interface for the shin-core library. It can be used to extract game data, and to convert it to other more conventional formats.

You can download it from the releases page.

For now, we have support for extracting the following data:

  • .rom - Game data archive
  • .bup - Character sprites
  • .pic - Backgrounds & CGs
  • .nxa - Game audio
  • .snr - Limited support for game scenario (no decompilation, only tracing the execution)
  • .fnt - Font data
  • .txa - Texture archives (used mostly for UI)

Support for other formats used is planned.

If you encounter any errors/problems when using the CLI - please open an issue on GitHub.

Building from source

To build from source you would need to have Rust installed.

Then you can build the engine with:

cargo build --release -p shin

And run it with:

cargo run --release -p shin

Disclaimer

This project is not affiliated with Entergram or 07th Expansion. It is an unofficial fan project.

It does not contain copyrighted game data, so you can't play the game if you didn't buy it.

Extension points exported contracts — how you extend this code

DrawableLayer (Interface)
A layer that has properties Yes, really, this trait doesn't have anything to do with drawing. [11 implementers]
shin/src/layer/mod.rs
IntoRuntimeForm (Interface)
Defines how to convert a compile-time representation `Self` to a runtime representation For example this is used to con [7 …
shin-core/src/vm/ctx/into_runtime_form.rs
RenderClone (Interface)
Like [`Clone`], but allows access to wgpu device and encoder to perform the copies Used to make "deep" copies of GPU re [11 …
shin-render-shader-types/src/clone.rs
InstrLowerFn (Interface)
Dummy type parameter is a hacky way to work around current rustc limitations rustc can't guarantee that all the differen [5 …
shin-asm/src/compile/hir/lower/instruction/instr_lowerer.rs
Action (Interface)
(no doc) [5 implementers]
shin-input/src/action.rs
ShinApp (Interface)
(no doc) [4 implementers]
shin-window/src/lib.rs
Catalog (Interface)
The theme catalog of a [`ComboBox`]. [1 implementers]
junk/mesh-vis/src/my_combo_box.rs
StatelessReader (Interface)
(no doc) [3 implementers]
shin-primitives/src/stateless_reader/mod.rs

Core symbols most depended-on inside this repo

unwrap
called by 729
shin-core/src/vm/command/types/id.rs
len
called by 405
shin-core/src/format/audio/audio_source.rs
read_sjis_string
called by 363
shin-core/src/format/text/mod.rs
map
called by 199
shin-asm/src/compile/types/in_file.rs
len
called by 115
shin-asm/src/parser/lex/mod.rs
iter
called by 112
shin-core/src/format/rom.rs
expect
called by 87
shin-asm/src/parser/parser.rs
push
called by 68
shin-core/src/format/sysse/kernel.rs

Shape

Method 1,636
Function 1,056
Class 586
Enum 178
Interface 58

Languages

Rust100%

Modules by API surface

shin-core/src/format/text/sjis_decode_tests.rs359 symbols
shin-core/src/format/text/sjis_round_trip_tests.rs125 symbols
shin-core/src/format/text/sjis_decode_unmapped_tests.rs64 symbols
junk/mesh-vis/src/my_combo_box.rs53 symbols
shin-core/src/layout/message_text_layouter/mod.rs45 symbols
shin-render/src/lib.rs38 symbols
shin-primitives/src/bit_utils/buffer.rs37 symbols
shin-core/src/format/scenario/info.rs37 symbols
shin/src/time.rs36 symbols
shin-core/src/format/font.rs35 symbols
shin/src/layer/properties.rs33 symbols
shin/src/layer/layer_group.rs32 symbols

For agents

$ claude mcp add shin \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact