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/Nintendo/Koji Kondo: Difference between revisions

From SnesLab
Jump to: navigation, search
(Adding categories)
(Add in two out of four CPUIO registers for Super Mario All-Stars)
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 insert protocol here''
====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''
 
'''TODO $2142/$F6 and $2143/$F7'''


===SimCity===
===SimCity===

Revision as of 21:34, 20 February 2022

Go back to N-SPC Engine/Nintendo

NOTE: This page is under construction.

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

TODO $2142/$F6 and $2143/$F7

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)