David Whittaker (NES Driver)

From Video Game Music Preservation Foundation Wiki
Jump to: navigation, search
David Whittaker
Released 1990-10-??
Programmers David Whittaker
Language 6502 Assembly
Formats Unknown (DW? ASM?)

David Whittaker is the unofficial name of the sound driver that David Whittaker created for the Nintendo Entertainment System. To create music and sound effects for his sound driver, Whittaker programmed the sound driver in 6502 assembly language and wrote the music and sound effects in assembly. According to Jeroen Tel, Whittaker converted his NES sound driver from his Commodore 64 sound driver.

Whittaker probably wrote the files as .DW files like his Amiga music, but it is unknown at this time. Like all NES games, the music can be extracted into NSF format.

Release History

The first released game to use Whittaker's sound driver for the NES was the North American exclusive title Loopz. The last game that used it, without Whittaker's knowledge, was The Lion King. The only Japanese game to be released with his driver was Castelian. In total, Whittaker's driver was used in 8 games for the NES. Whittaker has also stated in interviews writing the music for a few NES games that appear to be unreleased. One of these, for example, is an NES conversion of the computer game Licence to Kill.

When Manfred Trenz was developing Super Turrican for the NES, he needed a sound driver and asked Whittaker for his, and David lent him the source code for his engine, which Trenz modified and then used.

Tony Bybell reverse-engineered Whittaker's NES driver and wrote to the VGMPF:

Observations: 1) NES is loosely based on the Jason Brooke rewrite for C64. See attached Menace disassembly for comparison. 2) Sound effects are handled in a similar fashion on NES as C64. C64 tunes such as Ghostbusters 2 don't bind sfx voices 1+3 for sound effects and only use one of voice 1/2/3 either in a rolling fashion to allow overlapping sfx, or a reserved music channel can be hijacked dynamically. 3) Vibrato on the NES comes from tables that don't scale according to NES octave. Higher notes due to NES frequency encoding (see L_FREQTAB) can't even support +/-1 and would jump to the next note such as in the very highest octave. That said, he likely disabled vibrato in the song (as a facility doesn't exist in the assembler to do it) when he got above a certain octave. This limitation doesn't exist in C64 as it encodes frequency differently and in fact he scales vibration depth up per octave.

I also disassembled Alfred Chicken and the driver is 100% the same except relocated to $8000. Lion King has some stuff moved around but otherwise is the same driver. I haven't looked at any other NES drivers yet.

I played the NES disassemblies directly on C64 (using a quick and dirty realtime 2A03 on dual SID conversion) to verify they work, so these disassemblies are relocatable and good. I'm working on a fairly large scale 8-bit Whittaker project and I noticed that similarities exist for Spectrum as well. For example, I managed to port the command sets from both Xenon and Platoon to C64 players with very little difficulty and they sound like native C64 tunes. With some hands on work, Glider Rider on ZX would sound as good as the C64 original.

That said, his music format IS assembler, but only as much as to represent absolute pointer addresses for data.

1) Typically a song table of <speed>,<v1 lo>,<v1 hi>, ... <vn lo>,<vn hi> which would be 7 bytes per entry on c64 (3 SID voices) and 9 on NES (4 2A03 voices). 2) v# lo/hi pointers point to individual patterns. The pattern for a voice ends with a 0,0 pointer value, which generally states to repeat from the beginning. 3) Each pattern goes on until it ends with a platform-defined end byte such as $88 on C64, $87 on spectrum, or $ff on NES. 4) A special command exists to repeat the voice from a new v# lo/hi start. This is generally to repeat a song skipping some amount of intro material. 5) A special command exists for force immediate termination of a song. 6) NES contains special tables similar to "soundparameters" found on C64 editors such as Future Composer. These encode vibrato and tremolo information. The final byte of a table entry always has its high bit set. 7) Command vary from platform to platform but C64 vs Spectrum tells me he used macro expansion in an assembler. Again, these are not true assembled tunes per se, but music data is macro expanded and uses absolute pointers.

The format is fairly simple and reminds me a lot of Tony Crowther's (Ratt's) playeron C64, except Crowther could handle subroutines and nested loops as well as he didn't need absolute addresses so his music data are cut and paste relocatable. His music players were cross-platform workhorses for sure and being prolific was no accident. It appears to me that he had an excellent, macro-based system in place that at the source level was largely compatible from platform to platform and ensured he could quickly port work across platforms.

I haven't looked at Amiga DW files, but I wouldn't be surprised if he employed a similar methodology expanded to 32-bit 68k + harnessing Paula digitized effects.

Output

Whittaker's sound driver utilized the RP2A03 in North America/Japan and the RP2A07. Unfortunately, Whittaker either forgot to account for, or didn't care about the differences between 50 Hz in Europe and 60 Hz in the USA, resulting in his North American released games to sound higher in pitch and faster than normal. However, after the first two games, Whittaker configured his driver to play at approximately the same tempo in both PAL and NTSC formats. Whittaker's sound driver only utilized the four main channels of the NES APU. The DPCM channel was used only once in Krusty's Fun House, in which Krusty's laugh is heard at the title screen. Most of the instruments contained within the driver utilize vibrato, but they seem to be disable at the higher frequencies in some instances.

Games

Released Title Sample
1990-10-?? Loopz (NES)
1991-??-?? Elite (NES)
1991-06-?? Castelian (NES) (キョロちゃんランド)
1992-09-?? Krusty's Fun House (NES)
1992-10-?? Spider-Man: Return of the Sinister Six (NES)
1993-??-?? Alfred Chicken (NES)
1993-07-22 Super Turrican (NES)
1995-05-25 The Lion King (NES)
Unreleased 007: Licence to Kill (NES)
Unreleased Ferrari Grand Prix (NES)
Unreleased Populous (NES)
Unreleased Tip-Off (NES)

Technical

Frequency Registers

David Whittaker

G-7 = 11
F#7 = 12
F-7 = 13
E-7 = 14
D#7 = 15
D-7 = 16
C#7 = 18
C-7 = 19
B-6 = 1B
A#6 = 1C
A-6 = 1E
G#6 = 20
G-6 = 22
F#6 = 24
F-6 = 26
E-6 = 29
D#6 = 2B
D-6 = 2E
C#6 = 31
C-6 = 34
B-5 = 37
A#5 = 3A
A-5 = 3E
G#5 = 41
G-5 = 45
F#5 = 49
F-5 = 4E
E-5 = 52
D#5 = 57
D-5 = 5D
C#5 = 62
C-5 = 68
B-4 = 6F
A#4 = 75
A-4 = 7C
G#4 = 84
G-4 = 8B
F#4 = 94
F-4 = 9D
E-4 = A6
D#4 = B0
D-4 = BB
C#4 = C5
C-4 = D1
B-3 = DE
A#3 = EB
A-3 = F9
G#3 = 108
G-3 = 118
F#3 = 129
F-3 = 13B
E-3 = 14D
D#3 = 161
D-3 = 176
C#3 = 18D
C-3 = 1A4
B-2 = 1BD
A#2 = 1D7
A-2 = 1F3
G#2 = 211
G-2 = 230
F#2 = 252
F-2 = 275
E-2 = 29A
D#2 = 2C2
D-2 = 2EC
C#2 = 31A
C-2 = 348
B-1 = 37A
A#1 = 3AF
A-1 = 3E7

Manfred Trenz

C-6 = 32
B-5 = 35
A#5 = 38
A-5 = 3C
G#5 = 3F
G-5 = 43
F#5 = 47
F-5 = 4C
E-5 = 50
D#5 = 55
D-5 = 5A
C#5 = 5F
C-5 = 64
B-4 = 6B
A#4 = 71
A-4 = 78
G#4 = 80
G-4 = 87
F#4 = 90
F-4 = 98
E-4 = A1
D#4 = AB
D-4 = B7
C#4 = C0
C-4 = CC
B-3 = D8
A#3 = E7
A-3 = F4
G#3 = 104
G-3 = 113
F#3 = 123
F-3 = 134
E-3 = 147
D#3 = 15A
D-3 = 16F
C#3 = 185
C-3 = 19D
B-2 = 1B7
A#2 = 1D0
A-2 = 2E9
G#2 = 20B
G-2 = 229
F#2 = 24A
F-2 = 26C
E-2 = 28E
D#2 = 2B5
D-2 = 2DE
C#2 = 30A
C-2 = 338
B-1 = 369
A#1 = 39D
A-1 = 3D5

Links