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/Imagitec Design: Difference between revisions

From SnesLab
Jump to: navigation, search
(Minor correction and add build sorting notes and categories)
(Adding Dragon's Magic (Konami logo), which branched off of American Gladiators.)
 
(6 intermediate revisions by 2 users not shown)
Line 9: Line 9:
! Game Name !! Version !! VCMD Table Location ($E0 and up) !! ROM Offset
! Game Name !! Version !! VCMD Table Location ($E0 and up) !! ROM Offset
|-
|-
| Top Gear/Top Racer || 1.0 || <tt>0x0B89</tt>, relative to <tt>0x0AC9</tt> || <tt>0x0DE000</tt> (all versions)
| ''Top Gear/Top Racer'' || 1.0 || <tt>0x0B89</tt>, relative to <tt>0x0AC9</tt> || <tt>0x0DE000</tt> (all versions)
|-
|-
| American Gladiators || 2.0 || <tt>0x0B87</tt>, relative to <tt>0x0AC7</tt> || <tt>0x1E8000</tt>
| ''American Gladiators'' || 2.0 || <tt>0x0B87</tt>, relative to <tt>0x0AC7</tt> || <tt>0x1E8000</tt>
|-
|-
| The Humans || 2.0 || <tt>0x0B87</tt>, relative to <tt>0x0AC7</tt> || <tt>0x048000</tt>/<tt>0x058000</tt>/<tt>0x12C0FE</tt> ''(RNC compressed)''
| ''The Humans'' || 2.0 || <tt>0x0B87</tt>, relative to <tt>0x0AC7</tt> || <tt>0x048000</tt>/<tt>0x058000</tt>/<tt>0x12C0FE</tt> ''(RNC compressed)''
|-
|-
| Wheel of Fortune (Title Screen)<br>Wheel of Fortune - Deluxe Edition (Title Screen) || 3.0a || <tt>0x0BAF</tt>, relative to <tt>0x0AEF</tt> || <tt>0x0FB59C</tt> (all versions)
| ''Dragon's Magic'' (Konami logo) || 2.0 (Motivetime branch) || <tt>0x0B80</tt>, relative to <tt>0x0AC0</tt> || <tt>0x08C2BB</tt>
|-
|-
| Wheel of Fortune (In-Game)<br>Wheel of Fortune - Deluxe Edition (In-Game) || 3.0b || <tt>0x0775</tt>, relative to <tt>0x06B5</tt> || <tt>0x0C8000</tt>/<tt>0x0DD7D3</tt> (all versions)
| ''Wheel of Fortune'' (Title Screen)<br>''Wheel of Fortune - Deluxe Edition'' (Title Screen) || 3.0a || <tt>0x0BAF</tt>, relative to <tt>0x0AEF</tt> || <tt>0x0FB59C</tt> (all versions)
|-
| ''Wheel of Fortune'' (In-Game)<br>''Wheel of Fortune - Deluxe Edition'' (In-Game) || 3.0b || <tt>0x0775</tt>, relative to <tt>0x06B5</tt> || <tt>0x0C8000</tt>/<tt>0x0DD7D3</tt> (all versions)
|}
|}


The raw build sorting notes can be found [[N-SPC Engine/Imagitec Design Build Sorting|here]].
The raw build sorting notes can be found [[N-SPC Engine/Imagitec Design/Build Sorting|here]].


The only modification made to the VCMD formats are to remove the fast forward and channel mute VCMDs and fast forward phrase commands, and to allow the end phrase command (and/or a second note duration/quantization/velocity combo) to execute rather than playing an invalid note.
The only modification made to the VCMD formats are to remove the fast forward and channel mute VCMDs and fast forward phrase commands, and to allow the end phrase command (and/or a second note duration/quantization/velocity combo) to execute rather than playing an invalid note.
Line 112: Line 114:
* <tt>$11</tt> - Channel 6
* <tt>$11</tt> - Channel 6


=====Play Sound=====
=====Play SFX=====
Plays a piece of SFX. It seems like an array could be used here, but it isn't: instead, it's just an 8-byte entry to a series of DSP register writes to the Vx DSP registers before keying it on, with the channel and sound used varying by ID.
Plays a piece of SFX. It seems like an array could be used here, but it isn't: instead, it's just an 8-byte entry to a series of DSP register writes to the Vx DSP registers before keying it on, with the channel and sound used varying by ID.
=====Car Engine Init (Command <tt>$02, $0D</tt>)=====
<pre>?? ii ?? ??</pre>
* <tt>ii</tt>, the command ID used for the SFX, defines the channel used.
** Channel 5: <tt>$02</tt>
** Channel 7: <tt>$0D</tt>
=====Car Engine Speed (Command <tt>$03, $0E</tt>)=====
<pre>?? ii xx yy</pre>
* <tt>ii</tt>, the command ID used for the SFX, defines the channel used.
** Channel 5 (V4PITCH): <tt>$03</tt>
** Channel 7 (V6PITCH): <tt>$0E</tt>
* <tt>xx</tt> is a direct write to the VxPITCHL DSP register.
* <tt>yy</tt> is a direct write to the VxPITCHH DSP register.


=====Pause Sound (Command <tt>$19</tt>)=====
=====Pause Sound (Command <tt>$19</tt>)=====
Line 134: Line 150:
|<tt>$FF</tt> || Go to IPL Boot ROM || <tt>$FF ?? ?? ??</tt>
|<tt>$FF</tt> || Go to IPL Boot ROM || <tt>$FF ?? ?? ??</tt>
|}
|}
====Commands (V2.0 Motivetime Branch)====
The only difference is that Go to IPL Boot ROM is instead executed through VCMD $E2 (overwriting it in the process), along with stopping the sound.
{| class="wikitable sortable"
|-
! Command ID !! Description !! Register Values & Arguments
|-
|<tt>$00</tt> || Stop Sound || <tt>$00 ?? ?? ??</tt>
|-
|<tt>$01-??</tt> || Play Music || <tt>xx ?? ?? ??</tt>
|}
===Commands (V3.0a)===
===Commands (V3.0a)===
{| class="wikitable sortable"
{| class="wikitable sortable"
Line 143: Line 172:
|<tt>$01-$7F</tt> || Play Music || <tt>xx ?? ?? ??</tt>
|<tt>$01-$7F</tt> || Play Music || <tt>xx ?? ?? ??</tt>
|-
|-
|<tt>$41</tt> || Mute || <tt>$41 $58 ?? ??</tt>
|<tt>$41</tt> || Mute || <tt>$41 xx ?? ??</tt>
|-
|-
|<tt>$41</tt> || Mute + Go To IPL Boot ROM || <tt>$41 $58 ?? ??</tt>
|<tt>$41</tt> || Mute + Go To IPL Boot ROM || <tt>$41 $58 ?? ??</tt>
Line 152: Line 181:
Does absolutely nothing. Doesn't even acknowledge.
Does absolutely nothing. Doesn't even acknowledge.
====Mute====
====Mute====
Mutes the sound by zeroing out the master volume and zeroing out the DSP registers.
Mutes the sound by zeroing out the main volume and zeroing out the DSP registers.


<pre>$41 xx ?? ??</pre>
<pre>$41 xx ?? ??</pre>
Line 160: Line 189:
The phrase format has been massively modified to only have one channel, meaning the pointer goes directly to pattern data. You can still loop the now one-channel phrase pointer, though. The sub-routine command becomes a straight-up jump command due to the phrase termination command (ID <tt>$00</tt>) having been stripped of handling sub-routine code.
The phrase format has been massively modified to only have one channel, meaning the pointer goes directly to pattern data. You can still loop the now one-channel phrase pointer, though. The sub-routine command becomes a straight-up jump command due to the phrase termination command (ID <tt>$00</tt>) having been stripped of handling sub-routine code.


===Commands (V3.0a)===
===Commands (V3.0b)===
{| class="wikitable sortable"
{| class="wikitable sortable"
|-
|-
Line 171: Line 200:
|<tt>$10-$40</tt> || NOP || <tt>?? ?? ?? ??</tt>
|<tt>$10-$40</tt> || NOP || <tt>?? ?? ?? ??</tt>
|-
|-
|<tt>$41</tt> || Mute || <tt>$41 $58 ?? ??</tt>
|<tt>$41</tt> || Mute || <tt>$41 xx ?? ??</tt>
|-
|-
|<tt>$41</tt> || Mute + Go To IPL Boot ROM || <tt>$41 $58 ?? ??</tt>
|<tt>$41</tt> || Mute + Go To IPL Boot ROM || <tt>$41 $58 ?? ??</tt>
Line 186: Line 215:


====Mute====
====Mute====
Mutes the sound by zeroing out the master volume and zeroing out the DSP registers.
Mutes the sound by zeroing out the main volume and zeroing out the DSP registers.


<pre>$41 xx ?? ??</pre>
<pre>$41 xx ?? ??</pre>

Latest revision as of 23:25, 13 June 2023

Go back to N-SPC Engine

Imagitec Design is a company that used the N-SPC engine for most of its games. Most of these games don't actually support music and sound effects played together: only the earliest version does.

Game Name Version VCMD Table Location ($E0 and up) ROM Offset
Top Gear/Top Racer 1.0 0x0B89, relative to 0x0AC9 0x0DE000 (all versions)
American Gladiators 2.0 0x0B87, relative to 0x0AC7 0x1E8000
The Humans 2.0 0x0B87, relative to 0x0AC7 0x048000/0x058000/0x12C0FE (RNC compressed)
Dragon's Magic (Konami logo) 2.0 (Motivetime branch) 0x0B80, relative to 0x0AC0 0x08C2BB
Wheel of Fortune (Title Screen)
Wheel of Fortune - Deluxe Edition (Title Screen)
3.0a 0x0BAF, relative to 0x0AEF 0x0FB59C (all versions)
Wheel of Fortune (In-Game)
Wheel of Fortune - Deluxe Edition (In-Game)
3.0b 0x0775, relative to 0x06B5 0x0C8000/0x0DD7D3 (all versions)

The raw build sorting notes can be found here.

The only modification made to the VCMD formats are to remove the fast forward and channel mute VCMDs and fast forward phrase commands, and to allow the end phrase command (and/or a second note duration/quantization/velocity combo) to execute rather than playing an invalid note.

Communication with the SNES

All values are usually echoed back straight to the SNES on the register they were written to.

Commands (V1.0)

This is the only version to support playing sound effects in tandem with the music.

CPUIO0 ($2140/$F4)

This register is purely responsible for controlling the music. $00 stops the music, while $01-$FF play music.

CPUIO1 ($2141/$F5)

This register is constantly polled every tempo tick.

Command ID Description Register Values & Arguments
$00 Pass-Through ?? $00 ?? ??
$01 Stop Sound (Channels 5-8) ?? $01 ?? ??
$02 Car Engine Init (Channel 5) ?? $02 ?? ??
$03 Car Engine Speed (Channel 5) ?? $03 xx yy
$04 Pass-Through ?? $04 ?? ??
$05 Play SFX (Channel 6) ?? $05 ?? ??
$06 Stop Sound (Channels 6-8) ?? $06 ?? ??
$07 Play SFX (Channel 5) ?? $07 ?? ??
$08 Play SFX (Channel 6) ?? $08 ?? ??
$09 Play SFX (Channel 6) ?? $09 ?? ??
$0A Play SFX (Channel 6) ?? $0A ?? ??
$0B Play SFX (Channel 6) ?? $0B ?? ??
$0C Pass-Through ?? $0C ?? ??
$0D Car Engine Init (Channel 7) ?? $0D ?? ??
$0E Car Engine Speed (Channel 7) ?? $0E xx yy
$0F Pass-Through ?? $0F ?? ??
$10 Play SFX (Channel 8) ?? $10 ?? ??
$11 Stop Sound (Channels 6) ?? $11 ?? ??
$12 Play SFX (Channel 7) ?? $12 ?? ??
$13 Play SFX (Channel 8) ?? $13 ?? ??
$14 Play SFX (Channel 8) ?? $14 ?? ??
$15 Play SFX (Channel 8) ?? $15 ?? ??
$16 Play SFX (Channel 8) ?? $16 ?? ??
$17 Play SFX (Channel 8) ?? $17 ?? ??
$18 Stop Music + Go to IPL Boot ROM ?? $18 ?? ??
$19 Pause Sound ?? $19 ?? ??
$1A Play SFX (Channel 6) ?? $1A ?? ??
$1B Play SFX (Channel 8) ?? $1B ?? ??
$1C Play SFX (Channel 6) ?? $1C ?? ??
$1D Play SFX (Channel 8) ?? $1D ?? ??
$1E-$FF Pass-Through ?? ?? ?? ??
Pass-Through

Effectively a NOP, doing nothing.

Stop Sound

Disables the channel(s) indicated by ID as long as this command is the last ID sent...

  • $01 - Channels 5-8
  • $06 - Channels 6-8
  • $11 - Channel 6
Play SFX

Plays a piece of SFX. It seems like an array could be used here, but it isn't: instead, it's just an 8-byte entry to a series of DSP register writes to the Vx DSP registers before keying it on, with the channel and sound used varying by ID.

Car Engine Init (Command $02, $0D)
?? ii ?? ??
  • ii, the command ID used for the SFX, defines the channel used.
    • Channel 5: $02
    • Channel 7: $0D
Car Engine Speed (Command $03, $0E)
?? ii xx yy
  • ii, the command ID used for the SFX, defines the channel used.
    • Channel 5 (V4PITCH): $03
    • Channel 7 (V6PITCH): $0E
  • xx is a direct write to the VxPITCHL DSP register.
  • yy is a direct write to the VxPITCHH DSP register.
Pause Sound (Command $19)

Mutes everything while this command is the last ID sent.

Stop Music + Go to IPL Boot ROM (Command $18)

Uses the FLG DSP register to disable echo writes, mute the amplifier and key off all voices, then jumps to the IPL Boot ROM.

Commands (V2.0)

This code is nearly identical to Controller Test, except for the VCMD differences mentioned above, this command set, and a couple of other minor differences.

Command ID Description Register Values & Arguments
$00 Stop Sound $00 ?? ?? ??
$01-?? Play Music xx ?? ?? ??
$FF Go to IPL Boot ROM $FF ?? ?? ??

Commands (V2.0 Motivetime Branch)

The only difference is that Go to IPL Boot ROM is instead executed through VCMD $E2 (overwriting it in the process), along with stopping the sound.

Command ID Description Register Values & Arguments
$00 Stop Sound $00 ?? ?? ??
$01-?? Play Music xx ?? ?? ??

Commands (V3.0a)

Command ID Description Register Values & Arguments
$00 Stop Sound $00 ?? ?? ??
$01-$7F Play Music xx ?? ?? ??
$41 Mute $41 xx ?? ??
$41 Mute + Go To IPL Boot ROM $41 $58 ?? ??
$80-$FF NOP ?? ?? ?? ??

NOP

Does absolutely nothing. Doesn't even acknowledge.

Mute

Mutes the sound by zeroing out the main volume and zeroing out the DSP registers.

$41 xx ?? ??
  • xx, when set to $58, jumps to the IPL Boot ROM. Interestingly, that means that this command spells out AX in ASCII.

Commands (V3.0b)

The phrase format has been massively modified to only have one channel, meaning the pointer goes directly to pattern data. You can still loop the now one-channel phrase pointer, though. The sub-routine command becomes a straight-up jump command due to the phrase termination command (ID $00) having been stripped of handling sub-routine code.

Commands (V3.0b)

Command ID Description Register Values & Arguments
$00 Stop Sound $00 ?? ?? ??
$01-$0F Play Sound $0x ?? ?? ??
$10-$40 NOP ?? ?? ?? ??
$41 Mute $41 xx ?? ??
$41 Mute + Go To IPL Boot ROM $41 $58 ?? ??
$42-$FF NOP ?? ?? ?? ??

NOP

Does absolutely nothing. Doesn't even acknowledge.

Play Sound

$0x ?? ?? ??
  • x is the sound ID. All sounds play on channel 1. These are uninterruptible unless stopped with the $00 command first.

Mute

Mutes the sound by zeroing out the main volume and zeroing out the DSP registers.

$41 xx ?? ??
  • xx, when set to $58, jumps to the IPL Boot ROM. Interestingly, that means that this command spells out AX in ASCII.