N-SPC Engine/Nintendo: Difference between revisions
KungFuFurby (talk | contribs) (Adding build sorting notes) |
KungFuFurby (talk | contribs) (Adding F-Zero SNES communication protocol) |
||
Line 13: | Line 13: | ||
==F-Zero== | ==F-Zero== | ||
This is the first released game to use the standard N-SPC VCMD set starting at $E0. VCMDs $FB-$FF don't exist, though. | This is the first released game to use the standard N-SPC VCMD set starting at $E0. VCMDs $FB-$FF don't exist, though, and the fast forward phrase commands also don't exist here. | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 23: | Line 23: | ||
===Communication with the SNES=== | ===Communication with the SNES=== | ||
'' | Each CPUIO register has its own individual usage. | ||
====CPUIO0 ($2140/$F4)==== | |||
Loads new data when set to <tt>$FF</tt>. See [[N-SPC_Engine#Load_New_Data_.28Command_.24FF.29|the source build's Load New Data command]] for the loading protocol, as it is identical binary-wise to the copy used in this one minus the *Ver S1.20* string. Otherwise, it controls music and a few other sound effects. | |||
<u>Input</u> <pre>%xyyyzaaa</pre> | |||
<u>Output</u> <pre>%00000aaa</pre> | |||
* <tt>x</tt>, when set, fades out the music over 84 tempo ticks. It causes music VCMD <tt>$F5</tt> (echo enable bits and volume) to effectively act as a NOP when this happens. | |||
* <tt>yyy</tt> is a looping SFX ID for channel 6, with a range of <tt>%001($1)</tt>-<tt>%100($4)</tt>, and looping back to <tt>$1</tt> after <tt>$4</tt>. Except for <tt>$3</tt>, they also don't restore the instrument ID after playing them. | |||
* <tt>z</tt>, when set, causes the BRR engine noise generator from $2143/$F7 to output on channels 4-7. | |||
* <tt>aaa</tt> is a music ID that is output to the SNES. <tt>%110($6)</tt> is a special case, as it utilizes an ID that is defined via loading a single byte to a specific memory location, rather than its own (the ID itself is illegal if forced due to a zero pointer). Music data does not actually need to be loaded in this particular case, as it is all stored in one go. | |||
====CPUIO1 ($2141/$F5)==== | |||
<u>Input</u> <pre>%xyzzzzzz</pre> | |||
<u>Output</u> <pre>%00zzzzzz</pre> | |||
* <tt>x</tt> increases the overall BRR engine noise generator frequency on channel 8. The BRR engine noise generator frequency is designed to hiccup like a gearshift when activating. | |||
* <tt>y</tt> plays a continuous beeping tone on channel 6... unless the music that's currently playing is <tt>$11</tt>, which means a different SFX plays on channels 6 and 8. | |||
* <tt>zzzzzz</tt> controls the BRR engine noise generator frequency on channel 8. Disable with zero. This value is what is output to the SNES. | |||
====CPUIO2 ($2142/$F6)==== | |||
<pre>%xyzzaaaa</pre> | |||
The value output to the SNES is which bits are being utilized to play the SFX. Higher bits have more priority, but CPUIO0's channel 6 SFX has higher priority, which in turn is out-prioritized by CPUIO1's channel 6 SFX. | |||
* <tt>x</tt> stops the music and goes '''BOOM!''' Channels 3-8 are used, with 5-8 being continuously used afterwards. | |||
* <tt>y</tt> plays a UFO-like SFX on channel 6. | |||
* <tt>zz</tt> controls the BRR engine noise with vibrato on channel 6. | |||
* <tt>aaaa</tt> controls incidental SFX on channel 6. <tt>$4</tt> doesn't play anthing, and the values wrap around to <tt>$1</tt> after <tt>$8</tt>, except for $C, which plays <tt>$8</tt>. | |||
====CPUIO3 ($2143/$F7)==== | |||
<u>Input</u> <pre>%xxxxyyyy</pre> | |||
<u>Output</u> <pre>%0000xxxx</pre> | |||
*<tt>xxxx</tt> controls the panning of the second vehicle on channel 7, with zero representing left and $E representing right. Sets up a whole bunch of vehicle noises on channels 4-7 if set to $F instead that are not pitch-controllable. These bits are output to the SNES as the lowest four bits. | |||
*<tt>yyyy</tt> controls the BRR engine noise generator frequency (and volume) of the second vehicle on channel 7, or several at once on channels 1-5 and 7 if bit <tt>z</tt> on $2140/$F4 is set. | |||
====SFX Sequence Format==== | |||
Most of the SFX is hard-coded and the instrument format, when utilized outside of the actual instrument table, is identical to a music instrument's. The only SFX that actually uses a SFX sequence format beyond an array of notes is CPUIO0's bit <tt>yyy</tt> ID <tt>%010 ($2)</tt> (there's actually a second one defined, but it appears to never have been used). | |||
''TODO SFX sequence format (roughly the same as the Prototype variant, except with different supported VCMDs and with VCMD $FF doing the same thing as Pilotwings: restarting the SFX)'' | |||
==Aging Cassette/Sound Module and Burn-In Test== | ==Aging Cassette/Sound Module and Burn-In Test== |
Revision as of 03:34, 13 November 2020
Go back to N-SPC Engine
If you're looking for Super Mario World or Pilotwings, see the Prototype variant instead.
NOTE: The following page is a stub, and is under construction.
Nintendo is the first user of the N-SPC engine, both at launch and with the prototype variant. There are a variety of game-specific or programmer-specific cases in here, and thus have been sorted accordingly.
The raw build sorting notes can be found here for all variants by Nintendo.
TODO most other Nintendo games
F-Zero
This is the first released game to use the standard N-SPC VCMD set starting at $E0. VCMDs $FB-$FF don't exist, though, and the fast forward phrase commands also don't exist here.
Game Name | VCMD Table Location ($E0 and up) | ROM Offset |
---|---|---|
F-Zero | 0x0EE9, relative to 0x0E29 | 0x01E538 (US & Japanese versions) 0x01841E (European version) |
Communication with the SNES
Each CPUIO register has its own individual usage.
CPUIO0 ($2140/$F4)
Loads new data when set to $FF. See the source build's Load New Data command for the loading protocol, as it is identical binary-wise to the copy used in this one minus the *Ver S1.20* string. Otherwise, it controls music and a few other sound effects.
Input
%xyyyzaaa
Output
%00000aaa
- x, when set, fades out the music over 84 tempo ticks. It causes music VCMD $F5 (echo enable bits and volume) to effectively act as a NOP when this happens.
- yyy is a looping SFX ID for channel 6, with a range of %001($1)-%100($4), and looping back to $1 after $4. Except for $3, they also don't restore the instrument ID after playing them.
- z, when set, causes the BRR engine noise generator from $2143/$F7 to output on channels 4-7.
- aaa is a music ID that is output to the SNES. %110($6) is a special case, as it utilizes an ID that is defined via loading a single byte to a specific memory location, rather than its own (the ID itself is illegal if forced due to a zero pointer). Music data does not actually need to be loaded in this particular case, as it is all stored in one go.
CPUIO1 ($2141/$F5)
Input
%xyzzzzzz
Output
%00zzzzzz
- x increases the overall BRR engine noise generator frequency on channel 8. The BRR engine noise generator frequency is designed to hiccup like a gearshift when activating.
- y plays a continuous beeping tone on channel 6... unless the music that's currently playing is $11, which means a different SFX plays on channels 6 and 8.
- zzzzzz controls the BRR engine noise generator frequency on channel 8. Disable with zero. This value is what is output to the SNES.
CPUIO2 ($2142/$F6)
%xyzzaaaa
The value output to the SNES is which bits are being utilized to play the SFX. Higher bits have more priority, but CPUIO0's channel 6 SFX has higher priority, which in turn is out-prioritized by CPUIO1's channel 6 SFX.
- x stops the music and goes BOOM! Channels 3-8 are used, with 5-8 being continuously used afterwards.
- y plays a UFO-like SFX on channel 6.
- zz controls the BRR engine noise with vibrato on channel 6.
- aaaa controls incidental SFX on channel 6. $4 doesn't play anthing, and the values wrap around to $1 after $8, except for $C, which plays $8.
CPUIO3 ($2143/$F7)
Input
%xxxxyyyy
Output
%0000xxxx
- xxxx controls the panning of the second vehicle on channel 7, with zero representing left and $E representing right. Sets up a whole bunch of vehicle noises on channels 4-7 if set to $F instead that are not pitch-controllable. These bits are output to the SNES as the lowest four bits.
- yyyy controls the BRR engine noise generator frequency (and volume) of the second vehicle on channel 7, or several at once on channels 1-5 and 7 if bit z on $2140/$F4 is set.
SFX Sequence Format
Most of the SFX is hard-coded and the instrument format, when utilized outside of the actual instrument table, is identical to a music instrument's. The only SFX that actually uses a SFX sequence format beyond an array of notes is CPUIO0's bit yyy ID %010 ($2) (there's actually a second one defined, but it appears to never have been used).
TODO SFX sequence format (roughly the same as the Prototype variant, except with different supported VCMDs and with VCMD $FF doing the same thing as Pilotwings: restarting the SFX)
Aging Cassette/Sound Module and Burn-In Test
Game Name | VCMD Table Location ($E0 and up) | ROM Offset |
---|---|---|
Aging Cassette/Sound Module and Burn-In Test | 0x0EE9, relative to 0x0E29 | 0x0380BA (Aging Cassette) 0x038792 (SNES Burn-In Test Cartridge) |
Voice Command Format
TODO new music VCMDs (the standard set is offset backwards by two IDs, and three new VCMDs are added on)
Communication with the SNES
TODO identical to standard Kankichi/N-SPC except for new commands at $80, $90-$93, of which $80 does $90-$93's commands as well as provide output
TODO all other Nintendo variant games (that aren't known to be associated with other Nintendo variant games and likely have sound driver command differences between each other)