Nick Eastridge (NES Driver)
Nick Eastridge (NES Driver) | ||||||||
|
Nick Eastridge (NES Driver) is an unofficial name of the sound driver programmed by Nick Eastridge. Most games that used the driver were either published or developed by Mindscape, though it is believed that Nick Eastridge made some of the games through his company Eastridge Technology. To create music and sound effects for the driver, the user wrote in hexadecimal, as standard with video games at the time.
There doesn't appear to be an official name for the sound driver. The unreleased NES Days of Thunder stores the audio code in a file called "PBSOUND.ASM", the "PB" referring to Paperboy. However, the file itself contains no name for the sound driver.
Contents
Release History
The driver came in a few forms. The first game to use the driver was Paperboy, also the first NES game to be developed in North America. The first version of the driver is tuned to about 450Hz, but it was later revised to about 440Hz. Also, as time went on, it contained more features such as note velocity and hold/release parameters. The last game to use Eastridge's driver, WWF: King of the Ring, had some kind of glitch where when the last note in a song was played, it played for only one frame and would immediately return to the beginning of the song.
Most of the games using the driver only saw release in the US, though there were some exceptions where the games would be released in Europe. Paperboy is the only one of these to be released in Japan.
Output
The driver outputs to the RP2A03 in the USA and Japan, while in Europe, it plays on the RP2A07. In Europe, the game Battleship plays the music much slower and a whole step down.
Games
Released | Title | Sample | Version |
---|---|---|---|
1988-12-?? | Paperboy (NES) | |
1 |
1990-??-?? | Infiltrator (NES) | |
2 |
1990-06-?? | The Last Starfighter (NES) | |
1 |
1990-07-?? | Mad Max (NES) | |
1 |
1990-09-?? | Gauntlet II (NES) | |
2 |
1990-09-?? | M.U.L.E. (NES) | |
2 |
1990-10-?? | Orb•3D (NES) | |
3 |
1990-12-?? | Dirty Harry (NES) | |
1.5 |
1991-02-?? | Conan (NES) | |
2 |
1991-09-?? | Captain Planet and the Planeteers (NES) | |
3 |
1992-04-?? | Paperboy 2 (NES) | |
2 (Revised) |
1993-09-?? | Battleship (NES) | |
3 |
1993-11-?? | WWF King of the Ring (NES) | 2 (Revised) | |
Unreleased | Days of Thunder: Mindscape (NES) | |
1.5 |
Technical
Frequency Registers
Version 1
The first version of the driver adds extra frequencies that are unnecessary. For example, the note table should equate to:
C, C#/Db, D, D#/Eb, E, F, F#/Gb, G, G#/Ab, A, A#/Bb, B, the notes with slashes belonging to the same note. However, Nick's first version of the driver adds extra notes, according to the source code: C, C#, Db, Ebb, D#, Eb, E, F, F#, Gb, G, G#, Ab, A, Bbb, A#, Bb, and B. There are separate frequencies programmed for C#, Db, D#, Eb, G#, Ab, A#, and Bb, when really, each pairs of notes should play the same exact frequency, as they're the same note, just differently named. In addition, there is a B double flat and E double flat note, which are unnecessary.
This was fixed by Chris Oberth during the development of Days of Thunder, as the text string C#,Ebb,D#,F#,G#,Bbb,A# removed by OBE is present in the game's source code.
Note Value Frequency Gb 5 4C 4A F# 5 4B 4E F 5 4A 50 E 5 49 52 Eb 5 48 53 D# 5 47 57 Ebb5 46 59 D 5 45 5D Db 5 44 62 C# 5 43 63 - Mad Max adds frequencies C#5 and up. C 5 42 68 B 4 41 6F Bb 4 40 74 A# 4 3F 77 Bbb4 3E 7A A 4 3D 7D Ab 4 3C 82 G# 4 3B 84 G 4 3A 8B Gb 4 39 95 F# 4 38 9D F 4 37 9F E 4 36 A5 Eb 4 35 A7 D# 4 34 AE Ebb4 33 B2 D 4 32 BA Db 4 31 C4 C# 4 30 C6 C 4 2F D1 B 3 2E DF Bb 3 2D E8 A# 3 2C ED Bbb3 2B F5 A 3 2A FA Ab 3 29 105 G# 3 28 108 G 3 27 116 Gb 3 26 129 F# 3 25 139 F 3 24 13F E 3 23 14A Eb 3 22 14E D# 3 21 15C Ebb3 20 165 D 3 1F 173 Db 3 1E 188 C# 3 1D 18D C 3 1C 1A3 B 2 1B 1BF Bb 2 1A 1CF A# 2 19 1DB Bbb2 18 1E7 A 2 17 1F4 Ab 2 16 209 G# 2 15 20D G 2 14 22D Gb 2 13 250 F# 2 12 273 F 2 11 27D E 2 10 294 Eb 2 0F 29A D# 2 0E 2B9 Ebb2 0D 2C6 D 2 0C 2E2 Db 2 0B 311 C# 2 0A 319 C 2 09 346 B 1 08 378 Bb 1 07 399 A# 1 06 3B0 Bbb1 05 3D5 A 1 04 3E2
Version 2
The second revision of the driver changed its tuning from A = 450Hz (approximately a quarter step sharp) to about A = 440Hz (normal tuning).
B-6 = 1C A#6 = 1E A-6 = 20 G#6 = 22 G-6 = 24 F#6 = 26 F-6 = 28 E-6 = 2A D#6 = 2D D-6 = 30 C#6 = 32 C-6 = 35 B-5 = 39 A#5 = 3C A-5 = 40 G#5 = 43 G-5 = 47 F#5 = 4C F-5 = 50 E-5 = 55 D#5 = 5A D-5 = 5F C#5 = 65 C-5 = 6B B-4 = 71 NOTE VALUE FREQUENCY A#4 = 2F 78 A-4 = 2E 7F G#4 = 2D 87 G-4 = 2C 8F F#4 = 2B 97 F-4 = 2A A0 E-4 = 29 AA D#4 = 28 B4 D-4 = 27 BE C#4 = 26 CA C-4 = 25 D6 B-3 = 24 E2 A#3 = 23 F0 A-3 = 22 FE G#3 = 21 10D G-3 = 20 11D F#3 = 1F 12E F-3 = 1E 140 E-3 = 1D 153 D#3 = 1C 168 D-3 = 1B 17D C#3 = 1A 194 C-3 = 19 1AC B-2 = 18 1C5 A#2 = 17 1E0 A-2 = 16 1FC G#2 = 15 21B G-2 = 14 23B F#2 = 13 25D F-2 = 12 281 E-2 = 11 2A7 D#2 = 10 2CF D-2 = 0F 2FA C#2 = 0E 327 C-2 = 0D 357 B-1 = 0C 38A A#1 = 0B 3C0 A-1 = 0A 3F9 G#1 = 09 435 < - Triangle only G-1 = 475 F#1 = 4B9 F-1 = 501 E-1 = 54D D#1 = 59E D-1 = 5F4 C#1 = 64E C-1 = 6AE
Version 3
B-5 = 38 A#5 = 3C A-5 = 3F G#5 = 43 G-5 = 47 F#5 = 4B F-5 = 50 E-5 = 54 D#5 = 5A D-5 = 5F C#5 = 65 C-5 = 6A B-4 = 71 A#4 = 78 A-4 = 7F G#4 = 87 G-4 = 8E F#4 = 97 F-4 = A0 E-4 = A9 D#4 = B4 D-4 = BE C#4 = CA C-4 = D5 B-3 = E2 A#3 = F0 A-3 = FE G#3 = 10E G-3 = 11D F#3 = 12E F-3 = 141 E-3 = 153 D#3 = 168 D-3 = 17C C#3 = 194 C-3 = 1AB B-2 = 1C4 A#2 = 1E0 A-2 = 1FC G#2 = 21C G-2 = 23A F#2 = 25C F-2 = 282 E-2 = 2A6 D#2 = 2D0 D-2 = 2F8 C#2 = 328 C-2 = 356 B-1 = 388 A#1 = 3C0 A-1 = 3F8 G#1 = 438 G-1 = 474 F#1 = 4B8 F-1 = 504 E-1 = 54C D#1 = 5A0 D-1 = 5F0 C#1 = 650 C-1 = 6AC
Using the Driver
Writing music in the driver is fairly simple, but must be written in 6502 assembly macros with hexadecimal numbers. Also, the note pitch and length must be written separately, explained below.
Here is an example from the unreleased Days of Thunder NES game's title screen music:
;BTR2 tracka1 db $34,$0,$8B,$34,$18,$34,$18,$16 db $14,$0,$16,$14,$12,$0,$34,$18 db $16,$14,$16,$18,$14,$12,$34,$0 db $18,$16,$14,$0,$16,$14,$12,$0 db $34,$18,$16,$14,$16,$18,$14,$1B db $34,$0,$14,$34,$1D,$1B,$19,$0 db $1C,$1B,$19,$0,$1B,$19,$18,$19 db $1B,$19,$18,$0,$34,$20,$34,$18 db $16,$14,$0,$16,$14,$12,$0,$34 db $18,$16,$14,$16,$18,$12,$14,$32 dracka1 db $0,$50,$1,$1,$50,$0,$14,$A db $1E,$14,$14,$A,$1E,$14,$2,$A db $A,$A,$A,$A,$A,$1E,$0,$1E db $14,$A,$1E,$14,$14,$A,$1E,$14 db $2,$A,$A,$A,$A,$A,$A,$1E db $3,$1E,$28,$0,$14,$A,$1E,$14 db $14,$A,$1E,$14,$A,$A,$A,$A db $A,$A,$1E,$1E,$1,$28,$0,$14 db $A,$1E,$14,$14,$A,$1E,$14,$2 db $A,$A,$A,$A,$A,$A,$50,$0 trackb1 db $34,$0,$8B,$34,$20,$34,$20,$1E db $1D,$0,$1E,$1D,$1B,$0,$0,$0 db $81,$34,$34,$12,$34,$25,$23,$22 db $0,$28,$1B,$25,$0,$27,$24,$27 db $24,$0,$34,$1E,$34,$20,$1E,$1D db $0,$1E,$1D,$1B,$0,$0,$0,$0 db $32 drackb1 db $0,$50,$1,$1,$50,$0,$14,$A db $1E,$14,$14,$A,$1E,$14,$50,$28 db $A,$3,$3,$28,$0,$14,$A,$1E db $14,$14,$A,$1E,$14,$14,$14,$14 db $1E,$1E,$1,$28,$0,$14,$A,$1E db $14,$14,$A,$1E,$14,$50,$28,$14 db $0 trackc1 db $34,$0,$87,$1B,$20,$18,$20,$97 db $19,$1D,$19,$20,$83,$1B,$20,$18 db $20,$8A,$0,$0,$32 drackc1 db $0,$50,$1,$A,$A,$A,$A,$4 db $A,$A,$A,$A,$4,$A,$A,$A db $A,$4,$28,$14,$0 trackd1 db $34,$6,$0,$8E,$6,$0,$7,$0 db $87,$6,$0,$8,$0,$87,$6,$0 db $9,$0,$D8,$6,$0,$32 drackd1 db $0,$5,$5,$2,$5,$5,$5,$5 db $4,$5,$5,$5,$5,$4,$5,$5 db $5,$5,$4,$5,$5,$0
The track text denotes the note pitch, while the drack text denotes the note's length, counted by frames. The d most likely refers to the note duration.
Also, after track and drack are a letter and number. The letters a, b, c and d denote Square 1, Square 2, Triangle and Noise channels respectively. The number denotes the track number/ID.
Macros
Below are the use of the macros. Most of them still need to be figured out on their effects.
Notes
$29 = B4 $28 = A#4 $27 = A4 $26 = G#4 $25 = G4 $24 = F#4 $23 = F4 $22 = E4 $21 = D#4 $20 = D4 $1F = C#4 $1E = C4 $1D = B3 $1C = A#3 $1B = A3 $1A = G#3 $19 = G3 $18 = F#3 $17 = F3 $16 = E3 $15 = D#3 $14 = D-3 $13 = C#3 $12 = C-3 $11 = B2 $10 = A#2 $F = A2 $E = G#2 $D = G2 $C = F#2 $B = F2 $A = E2 $9 = D#2 $8 = D2 $7 = C#2 $6 = C-2 $5 = B1 $4 = A#1 $3 = A1 $2 = G#1 $1 = G-1 $0 = Rest
Note Length
Because the note lengths are programmed in frames, it is hard to list all of them, but here are a few examples at certain tempos:
LAST STAFIGHTER / MAD MAX / PAPERBOY: 150 BPM $10 = 8th triplet $0F = Dotted 8th note $0D = Half note + 8th triplet $0C = Whole note $0B = Half note $0A = Quarter note $09 = Dotted quarter note $08 = 16th note CONAN 1E = Dotted 8th note 18 = Whole note 16 = Half note 14 = Quarter note 12 = 8th note 11 = 8th triplet note 10 = 16th note 07 = 32nd note DAYS OF THUNDER / DIRTY HARRY: 112 BPM: $08 = 16th note $10 = 8th note $20 = Quarter note $40 = Half note $80 = Whole note 150 BPM: $06 = 16th note $0C = 8th note $18 = Quarter note $30 = Half note $60 = Whole note 180 BPM: $05 = 16th note $0A = 8th note $14 = Quarter note $28 = Half note $50 = Whole note
Other Macros
$E3 = ??? $97 = ??? $87 = ??? $8# = Repeat phrase # of times $34 = Initialize channel? $32 = Loop from the beginning
Earlier versions of Nick Eastridge's driver used the macros differently. For example, here's the first two bars for The Last Starfighter:
Each line is two beats for the first square channel. $38 $10 $2D $10 $38 $10 $40 $10 $3D $10 $3A $10 $38 $10 $2D $10 $38 $10 $40 $10 $3D $10 $40 $10 $42 $08 $00 $08 $00 $08 $38 $08 $38 $0A $38 $08 $00 $08 $38 $08 $38 $08 $38 $00 $00 $08 $00 $08 $00 $08
Translated into MML, the code would look like this:
F4+8t A#3+8t F4+8t A#4+8t A4+8t G4+8t (8t = 8th note triplet) F4+8t A#3+8t F4+8t A#4+8t A4+8t A#4+8t C5+16 r16 r16 F4+16 F4+Q (r = rest) F4+16 r16 F4+16 F4+16 F4+16 r16 r16 r16
Source Code
The source code for the unreleased version of Days of Thunder was released, and can be found here. The music is located in the PBSOUND.ASM. The PB most likely stands for Paperboy, as the same sound driver is used in Paperboy (NES).