N-SPC Engine/Nintendo/Koji Kondo: Difference between revisions
KungFuFurby (talk | contribs) (Adding categories) |
KungFuFurby (talk | contribs) (Replacing my under construction note with the standard stub template.) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
Go back to [[N-SPC Engine/Nintendo]] | Go back to [[N-SPC Engine/Nintendo]] | ||
{{stub}} | |||
'''Koji Kondo''' is the first user of the N-SPC engine, having used its earliest known version in two games. | '''Koji Kondo''' is the first user of the N-SPC engine, having used its earliest known version in two games. | ||
Line 15: | Line 15: | ||
===Super Mario All-Stars=== | ===Super Mario All-Stars=== | ||
The protocol in general is mostly adapted from Super Mario World's, though with some differences here and there, most notably in the triggering of the Hurry Up! SFX and the SFX sequences in general.<br> | The protocol in general is mostly adapted from Super Mario World's, though with some differences here and there, most notably in the triggering of the Hurry Up! SFX and the SFX sequences in general. | ||
''TODO | ====CPUIO0 ($2140/$F4)==== | ||
This register controls the SFX to play on channel 5. | |||
{| class="wikitable sortable" | |||
|- | |||
! Command ID !! Description | |||
|- | |||
|<tt>$00</tt> || NOP | |||
|- | |||
|<tt>%?xxxxxxx</tt><br><tt>$01-$7E/$81-$FE</tt> || Play SFX Sequence Set 1 | |||
|- | |||
|<tt>%?1111111</tt><br><tt>$7F/$FF</tt> || Hurry Up! | |||
|} | |||
=====NOP (Command <tt>$00</tt>)===== | |||
Does absolutely nothing. | |||
=====Play SFX Sequence Set 1 (Command <tt>$01-$7E/$81-$FE</tt>)===== | |||
<pre>%?xxxxxxx</pre> | |||
* <tt>%xxxxxxx</tt> is the SFX ID to play. The ID currently playing is echoed back to $2140 on the SNES, including the highest bit (which otherwise can be toggled for retriggering purposes, but otherwise doesn't actually do anything. | |||
** <tt>$11</tt> keys off all notes and pauses the music once it has finished playing. <tt>$12</tt> will unpause the music. | |||
** <tt>$11</tt> and <tt>$1D</tt> cannot be interrupted except by <tt>$43</tt>, <tt>$11</tt> or <tt>$12</tt>. | |||
** <tt>$3B</tt> and <tt>$43</tt> force echo off while they are playing. | |||
The <tt>$FF</tt> VCMD for this set only is programmed to restart the SFX from the beginning. | |||
======SFX Sequence Format====== | |||
See the [[N-SPC Engine/Prototype/SFX Sequence Format|SFX Sequence Format]] subpage. | |||
=====Hurry Up! (Command <tt>$7F/$FF</tt>)===== | |||
Plays SFX ID <tt>$1D</tt> on both SFX sequence sets and offsets the tempo by <tt>$0A</tt> without overflow checks. This can stack if it is played multiple times, but only the first one will remain in effect until forced off. | |||
====CPUIO1 ($2141/$F5)==== | |||
This register controls some hard-coded SFX on channel 8. | |||
{| class="wikitable sortable" | |||
|- | |||
! Command ID !! Description | |||
|- | |||
|<tt>$00</tt> || NOP | |||
|- | |||
|<tt>xy</tt><br><tt>$01-$EF, $F1-$FE</tt> || Hard-coded SFX + BRR Wind Control | |||
|- | |||
|<tt>$F0</tt> || Go to IPL Boot ROM | |||
|- | |||
|<tt>$FF</tt> || Load New Data | |||
|} | |||
=====NOP (Command <tt>$00</tt>)===== | |||
Does absolutely nothing. | |||
=====Hard-coded SFX + Noise BRR Wind Control (Command <tt>$01-$EF</tt>, <tt>$F1-$FE</tt>)===== | |||
<u>Input</u><pre>xy</pre> | |||
<u>Output</u><pre>%000xyyyy</pre> | |||
* <tt>x</tt> controls the BRR wind on channel 6 as following... | |||
** <tt>$1</tt> activates BRR wind on channel 6. The upper four bits will output a $1 to $2141 on the SNES. | |||
** <tt>$2</tt> deactivates BRR wind. This clears the output of the upper four bits for $2141. | |||
* <tt>y</tt> plays hard-coded SFX on channel 8 as following... | |||
** <tt>$1</tt> plays Mario's jumping SFX on channel 8. The value is echoed back to the SNES via $2141 while the SFX is playing. | |||
** <tt>$4</tt> plays the turnaround SFX. The value is echoed back to the SNES via $2141 while the SFX is playing. | |||
** All other values are NOPs. | |||
=====Go to IPL Boot ROM (Command <tt>$F0</tt>)===== | |||
''TODO go into specifics on what exactly is cleared out here before going to the loader'' | |||
=====Load New Data (Command <tt>$FF</tt>)===== | |||
''TODO go into specifics on what exactly is cleared out here before going to the loader'' | |||
====CPUIO2 ($2142/$F6)==== | |||
This register controls the music. | |||
{| class="wikitable sortable" | |||
|- | |||
! Command ID !! Description | |||
|- | |||
|<tt>$00</tt> || NOP | |||
|- | |||
|<tt>%01-$72</tt> || Play Music | |||
|- | |||
|<tt>$73-$EF</tt> || Stop Noise BRR Wind + Fade Out | |||
|- | |||
|<tt>$F0</tt> || Stop Music | |||
|- | |||
|<tt>$F1</tt> || Fade Song Volume | |||
|- | |||
|<tt>$F2</tt> || Restore Song Volume | |||
|- | |||
|<tt>$F3</tt> || Stop Noise BRR Wind + Fade Out + Reset Tempo Speedup | |||
|- | |||
|<tt>$F4-$FF</tt> || NOP | |||
|} | |||
=====NOP (Command <tt>$00</tt>, <tt>$F4-$FF</tt>)===== | |||
Does absolutely nothing. | |||
=====Play Music (Command <tt>$01-$72</tt>)===== | |||
* The command ID provided is the music ID to play. The ID currently playing is echoed back to $2142 on the SNES. | |||
** <tt>$07</tt>, <tt>$09</tt>, <tt>$0D</tt>, <tt>$11-$12</tt> and <tt>$14</tt> reset the tempo speedup effect done by the Hurry Up! command. | |||
=====Stop Noise BRR Wind + Fade Out (Command <tt>$73-$EF</tt>)===== | |||
Fades out the song volume to zero over 144 tempo ticks. The Noise BRR Wind is also halted. | |||
======Reset Tempo Speedup (Command <tt>$F3</tt>)====== | |||
Identical to the fade out command above, except the tempo speedup effect done by the Hurry Up! command is also reset, effective next tempo change or when another song is played. | |||
======Fade Song Volume (Command <tt>$F1</tt>)====== | |||
Sets the song volume to $70. | |||
======Restore Song Volume (Command <tt>$F2</tt>)====== | |||
Restores the song volume from a backup created from the $F1 command. If the backup turns out to be a zero volume case, this doesn't work. | |||
====CPUIO3 ($2143/$F7)==== | |||
This register controls the SFX to play on channel 7. | |||
{| class="wikitable sortable" | |||
|- | |||
! Command ID !! Description | |||
|- | |||
|<tt>$00</tt> || NOP | |||
|- | |||
|<tt>%?xxxxxxx</tt><br><tt>$01-$FF</tt> || Play SFX Sequence Set 2 | |||
|} | |||
=====NOP (Command <tt>$00</tt>)===== | |||
Does absolutely nothing. | |||
=====Play SFX Sequence Set 2 (Command <tt>$01-$FF</tt>)===== | |||
<pre>%?xxxxxxx</pre> | |||
* <tt>%xxxxxxx</tt> is the SFX ID to play. The ID currently playing is echoed back to $2143 on the SNES, including the highest bit (which otherwise can be toggled for retriggering purposes, but otherwise doesn't actually do anything. | |||
** <tt>$05</tt> and <tt>$1D</tt> cannot be interrupted by any other instances. <tt>$1D</tt>, however, can interrupt <tt>$05</tt>. | |||
The <tt>$FF</tt> VCMD for this set only is programmed to move the pointer back one byte instead of forward. | |||
======SFX Sequence Format====== | |||
See the [[N-SPC Engine/Prototype/SFX Sequence Format|SFX Sequence Format]] subpage. | |||
===SimCity=== | ===SimCity=== |
Latest revision as of 01:23, 21 May 2023
Go back to N-SPC Engine/Nintendo
Koji Kondo is the first user of the N-SPC engine, having used its earliest known version in two games.
TODO insert table here
The raw build sorting notes can be found here for all variants by Nintendo.
Communication with the SNES
For Super Mario World and Pilotwings, see the Prototype Variant's page.
Super Mario All-Stars
The protocol in general is mostly adapted from Super Mario World's, though with some differences here and there, most notably in the triggering of the Hurry Up! SFX and the SFX sequences in general.
CPUIO0 ($2140/$F4)
This register controls the SFX to play on channel 5.
Command ID | Description |
---|---|
$00 | NOP |
%?xxxxxxx $01-$7E/$81-$FE |
Play SFX Sequence Set 1 |
%?1111111 $7F/$FF |
Hurry Up! |
NOP (Command $00)
Does absolutely nothing.
Play SFX Sequence Set 1 (Command $01-$7E/$81-$FE)
%?xxxxxxx
- %xxxxxxx is the SFX ID to play. The ID currently playing is echoed back to $2140 on the SNES, including the highest bit (which otherwise can be toggled for retriggering purposes, but otherwise doesn't actually do anything.
- $11 keys off all notes and pauses the music once it has finished playing. $12 will unpause the music.
- $11 and $1D cannot be interrupted except by $43, $11 or $12.
- $3B and $43 force echo off while they are playing.
The $FF VCMD for this set only is programmed to restart the SFX from the beginning.
SFX Sequence Format
See the SFX Sequence Format subpage.
Hurry Up! (Command $7F/$FF)
Plays SFX ID $1D on both SFX sequence sets and offsets the tempo by $0A without overflow checks. This can stack if it is played multiple times, but only the first one will remain in effect until forced off.
CPUIO1 ($2141/$F5)
This register controls some hard-coded SFX on channel 8.
Command ID | Description |
---|---|
$00 | NOP |
xy $01-$EF, $F1-$FE |
Hard-coded SFX + BRR Wind Control |
$F0 | Go to IPL Boot ROM |
$FF | Load New Data |
NOP (Command $00)
Does absolutely nothing.
Hard-coded SFX + Noise BRR Wind Control (Command $01-$EF, $F1-$FE)
Input
xy
Output
%000xyyyy
- x controls the BRR wind on channel 6 as following...
- $1 activates BRR wind on channel 6. The upper four bits will output a $1 to $2141 on the SNES.
- $2 deactivates BRR wind. This clears the output of the upper four bits for $2141.
- y plays hard-coded SFX on channel 8 as following...
- $1 plays Mario's jumping SFX on channel 8. The value is echoed back to the SNES via $2141 while the SFX is playing.
- $4 plays the turnaround SFX. The value is echoed back to the SNES via $2141 while the SFX is playing.
- All other values are NOPs.
Go to IPL Boot ROM (Command $F0)
TODO go into specifics on what exactly is cleared out here before going to the loader
Load New Data (Command $FF)
TODO go into specifics on what exactly is cleared out here before going to the loader
CPUIO2 ($2142/$F6)
This register controls the music.
Command ID | Description |
---|---|
$00 | NOP |
%01-$72 | Play Music |
$73-$EF | Stop Noise BRR Wind + Fade Out |
$F0 | Stop Music |
$F1 | Fade Song Volume |
$F2 | Restore Song Volume |
$F3 | Stop Noise BRR Wind + Fade Out + Reset Tempo Speedup |
$F4-$FF | NOP |
NOP (Command $00, $F4-$FF)
Does absolutely nothing.
Play Music (Command $01-$72)
- The command ID provided is the music ID to play. The ID currently playing is echoed back to $2142 on the SNES.
- $07, $09, $0D, $11-$12 and $14 reset the tempo speedup effect done by the Hurry Up! command.
Stop Noise BRR Wind + Fade Out (Command $73-$EF)
Fades out the song volume to zero over 144 tempo ticks. The Noise BRR Wind is also halted.
Reset Tempo Speedup (Command $F3)
Identical to the fade out command above, except the tempo speedup effect done by the Hurry Up! command is also reset, effective next tempo change or when another song is played.
Fade Song Volume (Command $F1)
Sets the song volume to $70.
Restore Song Volume (Command $F2)
Restores the song volume from a backup created from the $F1 command. If the backup turns out to be a zero volume case, this doesn't work.
CPUIO3 ($2143/$F7)
This register controls the SFX to play on channel 7.
Command ID | Description |
---|---|
$00 | NOP |
%?xxxxxxx $01-$FF |
Play SFX Sequence Set 2 |
NOP (Command $00)
Does absolutely nothing.
Play SFX Sequence Set 2 (Command $01-$FF)
%?xxxxxxx
- %xxxxxxx is the SFX ID to play. The ID currently playing is echoed back to $2143 on the SNES, including the highest bit (which otherwise can be toggled for retriggering purposes, but otherwise doesn't actually do anything.
- $05 and $1D cannot be interrupted by any other instances. $1D, however, can interrupt $05.
The $FF VCMD for this set only is programmed to move the pointer back one byte instead of forward.
SFX Sequence Format
See the SFX Sequence Format subpage.
SimCity
This is the earliest released game to not have a command to load new data at all. Therefore, there is no way to switch sound drivers or even go back to the IPL ROM.
TODO insert protocol here
Super Donkey 1
TODO insert protocol here
Legend of Zelda - A Link To The Past
TODO insert protocol here
Star Glider
TODO insert protocol here
Star Fox/Star Wing
TODO insert protocol here
Super Mario: Yoshi Island/Super Mario World 2: Yoshi's Island
TODO insert protocol here
Star Fox 2
TODO insert protocol here (there may be quite a few revisions)