We've just updated MediaWiki and its underlying software. If anything doesn't look or work quite right, please mention it to us. --RanAS

N-SPC Engine/Kemco: Difference between revisions

From SnesLab
Jump to: navigation, search
(Adding link to build sorting notes)
(Adding command identifications)
Line 36: Line 36:
''TODO output for all CPUIO registers on a per-version basis''
''TODO output for all CPUIO registers on a per-version basis''
===CPUIO0 ($2140/$F4)===
===CPUIO0 ($2140/$F4)===
This register always controls which sound ID will play out of channels 1-6, regardless of which sound driver version is used. It also supports the source build's N-SPC/Kankichi commands.
This register always controls which sound ID will play out of channels 1-6, regardless of which sound driver version is used. It also supports the [[N-SPC_Engine#Communication_with_the_SNES|source build's N-SPC/Kankichi commands]].
''TODO''
===CPUIO1 ($2141/$F5)===
===CPUIO1 ($2141/$F5)===
This register controls which sound ID will play of of the following channel IDs, depending on the version...
This register controls which sound ID will play of of the following channel IDs, depending on the version...
Line 49: Line 48:
Never used in V2.0.<br>
Never used in V2.0.<br>
This CPUIO register is used to perform volume fades. The values supported depend on the sound driver version.
This CPUIO register is used to perform volume fades. The values supported depend on the sound driver version.
''TODO record values here and their purpose on a per-version basis''
====Commands (V1.0)====
{| class="wikitable sortable"
|-
! Command ID !! Description
|-
|<tt>$00-$9F</tt> || NOP
|-
|<tt>$A0</tt> || Halt Volume Operations (Channels 1-6)
|-
|<tt>$A1</tt> || Fade Out (Channels 1-6)
|-
|<tt>$A2</tt> || Fade In (Channels 1-6)
|-
|<tt>$A3</tt> || Zero Volume (Channels 1-6)
|-
|<tt>$A4</tt> || Volume Restore (Channels 7-8)
|-
|<tt>$A5</tt> || Halt Volume Operations (Channels 7-8)
|-
|<tt>$A6</tt> || Fade Out (Channels 7-8)
|-
|<tt>$A7</tt> || Fade In (Channels 7-8)
|-
|<tt>$A8</tt> || Zero Volume (Channels 7-8)
|-
|<tt>$A9</tt> || Volume Restore (Channels 7-8)
|-
|<tt>$AA-$FF</tt> || NOP
|}
====Commands (V3.0-V4.0)====
{| class="wikitable sortable"
|-
! Command ID !! Description !! Versions Supported
|-
|<tt>$00-$7F</tt> || NOP ||
|-
|<tt>$80</tt> || Halt Volume Operations (Channels 1-6) || V3.0-V3.1
|-
|<tt>$81</tt> || Fade Out (Channels 1-6) || V3.0-V3.1
|-
|<tt>$82</tt> || Fade In (Channels 1-6) || V3.0-V3.1
|-
|<tt>$83</tt> || Zero Volume (Channels 1-6) || V3.0-V3.1
|-
|<tt>$84</tt> || Volume Restore (Channels 1-6) || V3.0-V3.1
|-
|<tt>$85-$9F</tt> || NOP ||
|-
|<tt>$A0</tt> || Halt Volume Operations (Channels 7-8) || V3.0-V3.1
|-
|<tt>$A1</tt> || Fade Out (Channels 7-8) || V3.0-V3.1
|-
|<tt>$A2</tt> || Fade In (Channels 7-8) || V3.0-V3.1
|-
|<tt>$A3</tt> || Zero Volume (Channels 7-8) || V3.0-V3.1
|-
|<tt>$A4</tt> || Volume Restore (Channels 7-8) || V3.0-V3.1
|-
|<tt>$A5-$DF</tt> || NOP ||
|-
|<tt>$E0</tt> || Halt Volume Operations (Master Volume) || V3.0-V4.0
|-
|<tt>$E1</tt> || Fade Out (Master Volume) || V3.0-V4.0
|-
|<tt>$E2</tt> || Fade In (Master Volume) || V3.0-V4.0
|-
|<tt>$E3</tt> || Zero Volume (Master Volume) || V3.0-V4.0
|-
|<tt>$E4</tt> || Volume Restore (Master Volume) || V3.0-V4.0
|-
|<tt>$E5-$FF</tt> || NOP ||
|}
''TODO document commands''
''TODO for whatever reason some of these commands are bugged on later versions... document these bugs''


[[Category:SPC Sound Engines]]
[[Category:SPC Sound Engines]]
[[Category:N-SPC Variants]]
[[Category:N-SPC Variants]]

Revision as of 01:30, 14 November 2020

Go back to N-SPC Engine

Kemco is the first company outside of Nintendo themselves to release a game using their own variant of N-SPC (that being Bombuzal). The main customization that they did was to have the CPUIO registers play sounds on specific channels, and only the channels on the phase list specified to be used by the corresponding CPUIO register would be used. One other CPUIO register was allocated mainly to perform volume fades.

Game Name Version VCMD Table Location ($E0 and up) ROM Offset
Bombuzal 1.0 0x10EB, relative to 0x102B 0x04807A
Lagoon 2.0 0x1156, relative to 0x1096 0x0D80A4 (all versions)
Drakkhen 3.0 0x129E, relative to 0x11DE 0x1C805C (all versions)
Ka-blooey 3.0 0x129E, relative to 0x11DE 0x048080
First Samurai 3.1 0x129E, relative to 0x11DE 0x0DB15E (all versions)
Phalanx - The Enforce Fighter A-144 3.1 0x129E, relative to 0x11DE 0x1EB23E (all versions)
Super Drakkhen/Dragon View 3.1 0x129E, relative to 0x11DE 0x09B6F6 (all versions)
Super Full Metal 3.1 0x129E, relative to 0x11DE 0x0C80B6
X Zone 3.1 0x129E, relative to 0x11DE 0x0FAEE6 (all versions)
Kid Klown in Crazy Chase 4.0 0x12A1, relative to 0x11E1 0x1EC1E0 (all versions)

The raw build sorting notes can be found here.

Communication with the SNES

Each CPUIO register has an individual use.
TODO output for all CPUIO registers on a per-version basis

CPUIO0 ($2140/$F4)

This register always controls which sound ID will play out of channels 1-6, regardless of which sound driver version is used. It also supports the source build's N-SPC/Kankichi commands.

CPUIO1 ($2141/$F5)

This register controls which sound ID will play of of the following channel IDs, depending on the version...

  • V1.0, V3.0: Channels 7-8
  • V2.0, V4.0: Channel 7

CPUIO2 ($2142/$F6)

Only used in V2.0 and V4.0. This register always controls which sound ID will play out of channel 8.

CPUIO3 ($2143/$F7)

Never used in V2.0.
This CPUIO register is used to perform volume fades. The values supported depend on the sound driver version.

Commands (V1.0)

Command ID Description
$00-$9F NOP
$A0 Halt Volume Operations (Channels 1-6)
$A1 Fade Out (Channels 1-6)
$A2 Fade In (Channels 1-6)
$A3 Zero Volume (Channels 1-6)
$A4 Volume Restore (Channels 7-8)
$A5 Halt Volume Operations (Channels 7-8)
$A6 Fade Out (Channels 7-8)
$A7 Fade In (Channels 7-8)
$A8 Zero Volume (Channels 7-8)
$A9 Volume Restore (Channels 7-8)
$AA-$FF NOP

Commands (V3.0-V4.0)

Command ID Description Versions Supported
$00-$7F NOP
$80 Halt Volume Operations (Channels 1-6) V3.0-V3.1
$81 Fade Out (Channels 1-6) V3.0-V3.1
$82 Fade In (Channels 1-6) V3.0-V3.1
$83 Zero Volume (Channels 1-6) V3.0-V3.1
$84 Volume Restore (Channels 1-6) V3.0-V3.1
$85-$9F NOP
$A0 Halt Volume Operations (Channels 7-8) V3.0-V3.1
$A1 Fade Out (Channels 7-8) V3.0-V3.1
$A2 Fade In (Channels 7-8) V3.0-V3.1
$A3 Zero Volume (Channels 7-8) V3.0-V3.1
$A4 Volume Restore (Channels 7-8) V3.0-V3.1
$A5-$DF NOP
$E0 Halt Volume Operations (Master Volume) V3.0-V4.0
$E1 Fade Out (Master Volume) V3.0-V4.0
$E2 Fade In (Master Volume) V3.0-V4.0
$E3 Zero Volume (Master Volume) V3.0-V4.0
$E4 Volume Restore (Master Volume) V3.0-V4.0
$E5-$FF NOP

TODO document commands TODO for whatever reason some of these commands are bugged on later versions... document these bugs