Rare (NES Driver)

From Video Game Music Preservation Foundation Wiki
Jump to: navigation, search
Rare
Released 1987-08-??
Programmers Chris Stamper, Mark Betteridge
Language 6502 Assembly
Formats Unknown

Rare (NES Driver) is an unofficial name of the sound driver used in all of Rare's NES game. It was one of the most popular sound drivers on the NES, being used in almost 50 games. According to David Wise, it was first programmed by Rare's founder Chris Stamper and later programmed by Mark Betteridge. It isn't exactly clear when Mark worked on the driver, but his first credit is in Cobra Triangle, so he can be assumed as a sound programmer.

David Wise was the only person to compose music in the driver, but others used the driver for sound effects. To compose music for the NES, he had to write the music in 6502 assembly machine code. To do this, Wise would have to write with hexadecimal numbers. In an interview, David Wise elaborated how it worked:

The way it worked, I would use HEX numbers (16 numbers, 0-F) writing in one number for the pitch of the note and one for the length. For example “81,08”– where 81 would be a low c on the keyboard, followed by a length of 8 units. We had certain codes and routines which enabled us to do pitch bends, etc. From memory I think there were two variable pulse waves, a triangle wave and a noise channel for creating the sound tracks/FX. There was also a way to play back very crude samples, but we never had the luxury of that much memory.

Rare developed game show adaptations of Card Sharks, The Price is Right and Password, as well as Roller Thrasher, and Wolverine (the one by the Pickford brothers, no relation to the released one by Software Creations), but the game was never finished/released. It is assumed that they would have used the same sound driver.

Release History

The driver was used in all regions; North America, Europe, and Japan. The first game to use the driver was Slalom, released in 1987. The last game to use the driver was Battletoads Double Dragon, released as late as 1993.

Output

The chip outputs to the RP2A03 and RP20A7 sound chips. On the RP2A07, the music plays at the same speed, but is played a half-step lower than the RP2A03.

The driver is one of the few to take advantage of the DPCM channel, but only in rare instances. It was used in Pin-Bot for sound effects, and was used in the Battletoads games, and makes its most notable appearance as the pause music to Battletoads.

Games

Released Title Sample
1987-08-?? Slalom (NES)
1987-12-?? Wizards and Warriors (NES) (伝説の既視エルロンド)
1988-??-?? California Games (NES)
1988-02-?? R.C. Pro-Am (NES)
1988-09-?? Jeopardy! (NES)
1988-09-?? Wheel of Fortune (NES)
1988-11-?? Anticipation (NES)
1989-??-?? Cabal (NES)
1989-??-?? John Elway's Quarterback (NES)
1989-??-?? WWF Wrestlemania (NES)
1989-01-?? Sesame Street 123 (NES)
1989-02-?? Taboo: The Sixth Sense (NES)
1989-03-?? Marble Madness (NES)
1989-07-?? Cobra Triangle (NES)
1989-07-?? Sesame Street ABC (NES)
1989-08-?? Jordan vs. Bird: One on One (NES)
1989-09-?? Hollywood Squares (NES)
1989-09-?? Who Framed Roger Rabbit (NES)
1989-10-?? Jeopardy!: Junior Edition (NES)
1989-10-?? Wheel of Fortune: Junior Edition (NES)
1989-12-?? Ironsword: Wizards and Warriors II (NES)
1989-12-?? Silent Service (NES)
1990-??-?? Arch Rivals: A Basket Brawl! (NES)
1990-03-?? Wheel of Fortune: Family Edition (NES)
1990-04-?? Double Dare (NES)
1990-04-?? Ivan "Ironman" Stewart's Super Off Road (NES)
1990-04-?? Pinbot (NES)
1990-06-?? Captain Skyhawk (NES)
1990-06-?? Jeopardy!: 25th Anniversary Edition (NES)
1990-07-?? Snake Rattle N Roll (NES)
1990-08-?? NARC (NES)
1990-08-?? Time Lord (NES)
1990-09-?? Solar Jetman: Hunt for the Golden Warship (NES)
1990-10-?? A Nightmare on Elm Street (NES)
1990-10-?? Super Glove Ball (NES)
1990-11-?? WWF Wrestlemania Challenge (NES) (WWFレッスルマニアチャレンジ プロレスゲーム)
1990-12-?? Digger T. Rock: The Legend of the Lost City (NES)
1991-06-?? Battletoads (NES) (バトルトード)
1991-07-?? High Speed (NES)
1991-10-?? Pirates! (NES)
1991-11-?? Sesame Street 123 ABC (NES)
1992-01-?? Beetlejuice (NES)
1992-03-?? Wizards and Warriors III - Kuros: Visions of Power (NES)
1992-08-?? Danny Sullivan's Indy Heat (NES)
1992-12-?? R.C. Pro-Am II (NES)
1993-08-?? Battletoads and Double Dragon (NES)

Technical

Frequency Registers

B-5 = 38
A#5 = 3B
A-5 = 3F
G#5 = 42
G-5 = 46
F#5 = 4B
F-5 = 4F
E-5 = 54
D#5 = 59
D-5 = 5E
C#5 = 64
C-5 = 6A
B-4 = 70
A#4 = 77
A-4 = 7E
G#4 = 86
G-4 = 8E
F#4 = 96
F-4 = 9F
E-4 = A9
D#4 = B3
D-4 = BD
C#4 = C9
C-4 = D5
B-3 = E2
A#3 = EF
A-3 = FD
G#3 = 10C
G-3 = 11C
F#3 = 12D
F-3 = 13F
E-3 = 152
D#3 = 167
D-3 = 17C
C#3 = 193
C-3 = 1AB
B-2 = 1C4
A#2 = 1DF
A-2 = 1FC
G#2 = 21A
G-2 = 23A
F#2 = 25C
F-2 = 280
E-2 = 2A6
D#2 = 2CE
D-2 = 2F9
C#2 = 326
C-2 = 356
B-1 = 389
A#1 = 3BF
A-1 = 3F8
G#1 = 435
G-1 = 475
F#1 = 4B8
F-1 = 501
E-1 = 54E
D#1 = 59E
D-1 = 5F4
C#1 = 64D
C-1 = 6AE

Using the Driver

As David Wise explained above, the music is written in 6502 assembler macros; first, the note pitch itself is written, followed by the length. For example, here's the bassline from the menu theme from Wheel of Fortune (NES):

db $80,$06,$8C,$06,$8F,$06,$8C,$06,$91,$06,$8A,$06,$8B,$06,$8C,$06
db $80,$06,$8C,$06,$8F,$06,$8C,$06,$91,$06,$8C,$06,$93,$0C 

The driver doubles the time of the length counter. For example, normally $06 frames should be equivalent of a 16th note at 150 BPM. However, because it is doubled, it plays 12 frames instead, which would be an 8th note at 150 BPM.

Here is a breakdown of the above text written in Music Macro Language:

t150

r8 b1+8 d2+8 b1+8 e2+8 a1+8 as1+8 b1+8 ;r = Rest, Note/Octave+Length (notation), s = Sharp
r8 b1+8 d2+8 b1+8 e2+8 b1+8 fs2+4 

Music Notes

Here is a table to the note values:

BC = B-5
BB = A#5
BA = A-5
B9 = G#5
B8 = G-5
B7 = F#5
B6 = F-5
B5 = E-5
B4 = D#5
B3 = D-5
B2 = C#5
B1 = C-5
B0 = B-4
AF = A#4
AE = A-4
AD = G#4
AC = G-4
AB = F#4
AA = F-4
A9 = E-4
A8 = D#4
A7 = D-4
A6 = C#4
A5 = C-4
A4 = B-3
A3 = A#3
A2 = A-3
A1 = G#3
A0 = G-3
9F = F#3
9E = F-3
9D = E-3
9C = D#3
9B = D-3
9A = C#3
99 = C-3
98 = B-2
97 = A#2
96 = A-2
95 = G#2
94 = G-2
93 = F#2
92 = F-2
91 = E-2
90 = D#2
8F = D-2
8E = C#2
8D = C-2
8C = B-1
8B = A#1
8A = A-1
89 = G#1
88 = G-1
87 = F#1
86 = F-1
85 = E-1
84 = D#1
83 = D-1
82 = C#1
81 = C-1
80 = Rest

Source Code

None of the games that use the driver have had their source code released.

Links