There's a simple definition that is compatible with every existing mapper, and requires only signals that are already on the expansion port.
Note that top-loading NESes don't have an expansion port.
In the NES, writes to $4016 keep track of the bottom three bits, but only the bottom one bit is normally accessible. The other two bits are only on the expansion port, and could be used as a signal to latch the upper five bits.
So a simple design, using the other major PSG of the era (the SN76494) might latch D7-D4 on a rising edge of OUT2, latch D7-D4 (save as the lower half byte) on a falling edge of OUT2, and connect OUT1 to /WE and /CE. A game would do something like
Code: Select all
lda #$76 ; 1789773Hz÷110Hz = 508 = 0b0111_1111_00 ; four msbits here, out2 rising edge, out1 high
sta $4016
lda #$10 ; select register 0, "tone 1 frequency", and out2 and out1 falling edges
sta $4016
ldx #6
delay1: dex
bpl delay1
lda #$F6 ; four middle bits of period here, out2 rising edge, out1 high
sta $4016
lda #0 ; two lsbits here, and out2 and out1 falling edges
sta $4016
ldx #6
delay2: dex
bpl delay2
lda #2 ; prevent re-write of register
sta $4016
The AY-3-8910 requires nine bits, not eight, but a similar division is possible. The expansion port even provides the user with access to the 4MHz CIC clock, but it's a low-quality clock source and probably wouldn't be in tune with the crystal used by the NES itself.
Some existing games that were also released in Japan might already use OUT1 and OUT2 for other purposes.