Changes

Jump to navigation Jump to search
3,673 bytes added ,  19:15, 14 September 2017
Add SNES VC documentation
Line 1: Line 1: −
There's two types of VC titles: regular VC titles, and dedicated GBA VC titles.
+
There are several types of VC titles: NES/GB/GBC VC titles, SNES VC titles, GameGear VC titles and GBA VC titles.
 +
Except for GBA VC, the games are ran using emulators.
   −
=Regular VC=
+
=NES/GB/GBC VC=
Regular VC titles: an emulator application + VC ROM in the NCCH [[RomFS]](among other things in the RomFS). The emulator build includes support for all supported VC platfms, not specific to just the included ROM platform.
+
An emulator application + VC ROM in the NCCH [[RomFS]] (among other things in the RomFS). The emulator build includes support for all these three platforms, not specific to just the included ROM platform.
    
This emulator includes GBA support, however the GBA emulation for this this is somewhat slow. This was presumably implemented before AGB_FIRM was.
 
This emulator includes GBA support, however the GBA emulation for this this is somewhat slow. This was presumably implemented before AGB_FIRM was.
Line 25: Line 26:  
* "SecureValue": The random number used by [[Anti Savegame Restore]]. No known version of the emulator implements both savestates and secure value.
 
* "SecureValue": The random number used by [[Anti Savegame Restore]]. No known version of the emulator implements both savestates and secure value.
 
Overwriting sav.dat with 0xFF-bytes doesn't have any affect on the actual emulator. Doing that with most of the rsm*.dat data doesn't crash anything.
 
Overwriting sav.dat with 0xFF-bytes doesn't have any affect on the actual emulator. Doing that with most of the rsm*.dat data doesn't crash anything.
 +
 +
=SNES VC=
 +
An emulator application + VC ROM in the NCCH [[RomFS]] (among other things in the RomFS).
 +
SNES VC titles are New 3DS exclusive.
 +
 +
==RomFS==
 +
* "rom:/ErrorMessage/" This directory contains text used by the emulator app.
 +
* "rom:/shader/" This directory contains .shbin GPU shaders used by the emulator app.
 +
* "rom:/VCM/" This directory contains text used by the emulator app.
 +
* "rom:/caravel.bcsar" This file contains audio used by the emulator app.
 +
* "rom:/ctrl_change.arc" This file contains graphics used by the emulator app.
 +
* "rom:/data.bin" This file contains the ROM and other data. See below for documentation.
 +
* "rom:/ErrorMessage.arc" This file contains graphics used by the emulator app.
 +
* "rom:/KTR-XXXX.icn" Copy of the SMDH of the game.
 +
* "rom:/shader.shbin" GPU shader.
 +
* "rom:/nnfont_RectDrawerShader.shbin" GPU shader.
 +
* "rom:/VCM.arc" This file contains graphics used by the emulator app.
 +
 +
===data.bin structure===
 +
All header values are little-endian.
 +
{| class="wikitable" border="1"
 +
|-
 +
!  START
 +
!  SIZE
 +
!  DESCRIPTION
 +
|-
 +
| 0x00
 +
| 0x4
 +
| Always 0x00000100
 +
|-
 +
| 0x04
 +
| 0x4
 +
| File size
 +
|-
 +
| 0x08
 +
| 0x4
 +
| Always 0x00000030
 +
|-
 +
| 0x0C
 +
| 0x4
 +
| Always 0x00000050
 +
|-
 +
| 0x10
 +
| 0x4
 +
| Start of the ROM (always 0x00000060 in official VC)
 +
|-
 +
| 0x14
 +
| 0x4
 +
| End of the ROM
 +
|-
 +
| 0x18
 +
| 0x4
 +
| Start of the footer region (presumably an index for the PCM audio samples). Matches end of file/file size if PCM data is missing
 +
|-
 +
| 0x1C
 +
| 0x4
 +
| Always 0
 +
|-
 +
| 0x20
 +
| 0x4
 +
| Start of decompressed SDD-1 graphics data region. Matches end of file/file size if no SDD-1 chip is present
 +
|-
 +
| 0x24
 +
| 0x8
 +
| Product ID (KTR-XXXX), determines filenames in savedata
 +
|-
 +
| 0x2C
 +
| 0x4
 +
| Always 0
 +
|-
 +
| 0x30
 +
| 0x1
 +
| Always 0x3C
 +
|-
 +
| 0x31
 +
| 0x3
 +
| ROM size
 +
|-
 +
| 0x34
 +
| 0x1
 +
| Always 0
 +
|-
 +
| 0x35
 +
| 0x3
 +
| Size of the converted PCM audio samples region (starting after ROM). 0 is PCM data is missing
 +
|-
 +
| 0x38
 +
| 0x1
 +
| Always 0
 +
|-
 +
| 0x39
 +
| 0x2
 +
| Footer region size
 +
|-
 +
| 0x3B
 +
| 0x2
 +
| Always 0
 +
|-
 +
| 0x3D
 +
| 0x2
 +
| Game preset ID? (varies for each game). Incremental, started with 0x10XX values in old releases, newest ones have 0x11XX (with XX being back to low values).
 +
|-
 +
| 0x3F
 +
| 0x1
 +
| Always 0x2
 +
|-
 +
| 0x40
 +
| 0x1
 +
| Sound volume
 +
|-
 +
| 0x41
 +
| 0x1
 +
| ROM type (0x15 == HiROM/0x14 == LoROM)
 +
|-
 +
| 0x42
 +
| 0xE
 +
| Always 0
 +
|-
 +
| 0x50
 +
| 0x4
 +
| Always 0x00000003
 +
|-
 +
| 0x54
 +
| 0x4
 +
| Always 0x00000001
 +
|-
 +
| 0x58
 +
| 0x8
 +
| Always 0
 +
|}
 +
 +
The 0x60 header is followed by the SNES ROM, often altered to replace audio samples with pointers to external PCM audio files converted from the game, presumably to speed up emulation (these pointers can be found by looking for "PCMF" in the ROM, as seen on [https://github.com/Plombo/vcromclaim/blob/master/snesrestore.py Wii VC]).
 +
The ROM is then followed by the PCM audio files, optionally by the SDD-1 decompressed graphics data (presumably the emulator doesn't properly emulate the chip because of hardware constraints) and by a footer which appears to be an index for the PCM audio data.
 +
There are no specific setting fields for games, and it appears that there are "game presets" stored in the emulator code, which determines the cart expansion chip and probably more game-specific settings. Each official VC release has a different preset ID in the header.
 +
 +
==Savedata==
 +
The savedata can contain:
 +
* "KTR-XXXX.cfg": Appears to contain the "preset ID" and possibly more game/save information.
 +
* "KTR-XXXX.vea": Current emulator save-state, for storing/loading state at VC-title launch/exit.
 +
* "KTR-XXXX.ves": The actual savedata used by the emulated ROM.
 +
 +
Filenames are determined in the ROM header.
    
=GBA VC=
 
=GBA VC=
21

edits

Navigation menu