New VRC7 patch set

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
New VRC7 patch set
by on (#97361)
Edit: this patch set and test has been updated, see the post below.
Edit: the actual patch set was finally dumped, see the other post below.


I've spent some time over the last several days going over the VRC7 patch set with the CopyNES VRC7 tuner. This is about as close as I can get; some patches appear to be exact, but many have very minute differences which I could not reconcile. Also, there are many factors which make an exact match very hard; vibrato/tremolo don't synch with the note, so patches which use them are a bit variable, and there are some other random factors which seem to affect the onset of the note that I don't understand, but again they make some patches sound slightly different each time (just in the onset of the tone though).

This is an incremental improvement on the patch set quietust posted a few years ago. This would have taken a lot more time if it weren't for the prior work of kevtris and quietust, especially on the VRC7 tuner tool.

Code:
rainwarrior's VRC7 patches:

00 00 00 00 00 00 00 00
03 21 05 06 B8 82 42 27
13 41 13 0D D8 D6 23 12
31 11 08 08 FA 9A 22 02
31 61 18 07 78 64 30 27
22 21 1E 06 F0 76 08 28
02 01 06 00 F0 F2 03 F5
21 61 1D 07 82 81 16 07
23 21 1A 17 CF 72 25 17
15 11 25 00 4F 71 00 11
85 01 12 0F 99 A2 40 02
07 C1 69 07 F3 F5 A7 12
71 23 0D 06 66 75 23 16
01 02 D3 05 A3 92 F7 52
61 63 0C 00 94 AF 34 06
21 62 0D 00 B1 A0 54 17


The USB CopyNES host I used is available here:
https://github.com/bbbradsmith/usbcopynesblue

There are some minor source code changes to the VRC7 tuner tool; the modulator volume range is fixed (only went to 32 instead of 64), and saving files is fixed, as well as adding keyboard shortcuts Q/W/E to play the tones. I haven't uploaded a build with the fixed tool, but the source code fixes are in at that repository.


Edit: attached source code an NES/NSF for the test. (Edit: I have since made a better test, however.)

by on (#97366)
For anyone who is curious what the differences are, here's the changes in my new set, vs quietust's old one:

quietust.vrc7 > rainwarrior.vrc7:

patch 1:
Modulator output: 4 > 5
Modulator attack: 8 > 11
Modulator decay: 13 > 8
Carrier attack: 15 > 8
Carrier sustain: 1 > 2

patch 2:
Modulator output: 5 > 19
Feedback: 6 > 5
Modulator attack: 9 > 13
Modulator decay: 9 > 8
Carrier attack: 9 > 13
Modulator sustain: 6 > 2

patch 3:
Modulator output: 16 > 8
Feedback: 2 > 0
Modulator decay: 0 > 10
Carrier decay: 12 > 10
Modulator sustain: 3 > 2

patch 4:
Modulator rate scaling: 0 > 1
Modulator output: 29 > 24
Modulator attack: 9 > 7
Modulator decay: 15 > 8
Modulator sustain: 2 > 3

patch 6:
Carrier sustain: 9 > 15

patch 7:
Modulator output: 28 > 29

patch 8:
Modulator attack: 14 > 12
Carrier attack: 8 > 7
Carrier release: 5 > 7

patch 9:
Modulator sustain: 1 > 0
Modulator rate scaling: 0 > 1
Modulator output: 31 > 37
Modulator attack: 8 > 4
Modulator decay: 6 > 15
Carrier attack: 4 > 7
Modulator sustain: 2 > 0

patch 10:
Modulator output: 31 > 18
Modulator attack: 14 > 9
Modulator decay: 4 > 9
Modulator sustain: 1 > 4
Modulator release: 1 > 0
Carrier sustain: 1 > 0

patch 11:
Modulator level scale: 0 > 1
Modulator output: 43 > 41
Carrier level scale: 1 > 0
Feedback: 5 > 7
Modulator attack: 11 > 15
Modulator decay: 4 > 3
Carrier decay: 1 > 5
Modulator sustain: 2 > 10
Modulator release: 4 > 7
Carrier sustain: 15 > 1
Carrier release: 4 > 2

patch 12:
Modulator rate scaling: 0 > 1
Modulator output: 17 > 13
Modulator attack: 9 > 6
Carrier attack: 9 > 7
Carrier decay: 6 > 5
Modulator sustain: 1 > 2

patch 13:
Modulator attack: 8 > 10
Modulator decay: 2 > 3
Carrier attack: 10 > 9
Modulator sustain: 3 > 15
Modulator release: 1 > 7
Carrier release: 1 > 2

patch 14:
Carrier vibrato: 0 > 1
Carrier multiplier: 2 > 3
Modulator output: 13 > 12
Feedback: 2 > 0
Modulator attack: 12 > 9
Modulator decay: 3 > 4
Carrier attack: 7 > 10
Modulator sustain: 2 > 3
Carrier release: 5 > 6

patch 15:
Modulator output: 14 > 13
Modulator attack: 10 > 11
Modulator sustain: 4 > 5

by on (#97388)
I haven't compared side-by-side with actual recordings yet... but it sounds great to me at first listen!

Nice work. :)
Re: New VRC7 patch set
by on (#182878)
Just realized I never published the ROM/NSF of the test, or its source code. Added to OP.
Re: New VRC7 patch set
by on (#206193)
I found a few sustain, decay and release values are slightly off according to the waveforms in the patch test recording (internal patch first, approximated second). The set is very close, of course— I found only three instances one point off.

It was in the process of updating my emulator that I made the following adjustments to achieve close results to the h/w recording:

Patch #1:
Carrier decay 2 > 1
Carrier sustain 2 > 3
$"03 21 05 06 B8 81 42 37"

Patch #14:
Carrier release 6 > 7
$"61 63 0C 00 94 AF 34 07"

Patch #15:
Carrier release 7 > 8
$"21 62 0D 00 B1 A0 54 18"

(Also: thanks for your work, rainwarrior.)
Re: New VRC7 patch set
by on (#224835)
Sorry it took me a year to find the time to review this.

On patch 1 and 15 I think both of these are closer to the original. (I suspect we could even bump up that patch 15 release one more notch, will check soon.)

Patch 14 looks like a regression to me. The release is now too short. You should check too, yourself, but take a look at the image below, showing my patch #14 at the top right, yours at the bottom, built-in on left.

This is from a recording of the patch_vrc7 test from: https://github.com/bbbradsmith/nes-audio-tests

(This is a slight improvement over my old patch set test, as the timing is now cycle-counted rather than polling the PPU, so different recordings can still be very precisely synchronized now.)
Re: New VRC7 patch set
by on (#224838)
Did some more investigation in the VRC7 tuner. I forgot how much of a pain the LFO is, since it's free-run and not synched with anything you have to test the sounds over and over.

Looking more closely at ap9's changes:
  • Patch 1 carrier decay: Yes, this is a good change.
  • Patch 1 carrier sustain: No, keep at 2. 3 goes too quiet. This instrument has a long decay so it takes several seconds to hit sustain, but once it does it's clearly 2 and not 3.
  • Patch 14 carrier release: No, keep at 6. 7 is too fast.
  • Patch 15 carrier release: Revised. This was a step in the right direction, some of the releases were too long, but looking at it again I think the missing ingredient was carrier key rate scaling. With KRS and carrier release of 6, I think the release is now correct.

I also adjusted the modulator decay of patch 12 (should be slightly faster), and modulator attack of patch 15 (also slightly faster).

Having the opportunity to go over these again but with a lot less difference between the current state and the goal was a big help here. Those LFO instruments were wearing me out when I worked on this 6 years ago, and I think I was able to approach them a lot more carefully with this more refined problem to deal with. Ap9's adjustment to patch 15 really helped me see what was missing there, could never get the opening of the attack right across all octaves before, but with KRS it seems to match very well now. (I actually don't really have any glaring problems in this set after going over it... it feels extremely close now in a way that it didn't last time.)

Here's my new changes vs my previous set above and ap9's:

Patch 1
Carrier decay: 2 > 1 (agree with ap9)
Carrier sustain: 2 (stays)
03 21 05 06 B8 81 42 27

Patch 12
Modulator decay: 6 > 7
71 23 0D 06 67 75 23 16

Patch 14
Carrier release: 6 (stays, 7 is too fast)
61 63 0C 00 94 AF 34 06

Patch 15
Carrier KRS: off > on
Modulator attack: B > C
Carrier release: 7 > 6
21 72 0D 00 C1 A0 54 16


As always, would love any verification I could get on this, but I do know how few people have the necessary tools to really go into it (it even took me a year to get around to this one). The hotswap test I linked in my last post is a useful survey of the set, but it only does 3 octaves, with release on 1 them (just as a test of release). To really verify you need to use something like the CopyNES VRC7 tuner and try out lots of octaves, etc. Like the Patch 1 sustain wasn't something that that test could catch because the notes aren't long enough for that decay length. Well, maybe someday someone will finish staining that decap and we can know for sure. :S

Edit: I downloaded the demo of plgDavid's program, which actually has a set of VRC7 patches of its own stored in some text files. Surprisingly there's a lot of differences from all the patch sets I have archived from over the years. I guess this is a completely independent reverse engineering. Despite there being a lot of bits that are different, these patches also sound pretty close. (Though there's probably a lot of stuff that don't make a difference to the sound...)
Re: New VRC7 patch set
by on (#224854)
rainwarrior wrote:
Edit: I downloaded the demo of plgDavid's program, which actually has a set of VRC7 patches of its own stored in some text files. Surprisingly there's a lot of differences from all the patch sets I have archived from over the years. I guess this is a completely independent reverse engineering. Despite there being a lot of bits that are different, these patches also sound pretty close. (Though there's probably a lot of stuff that don't make a difference to the sound...)


I suspect we will never get them 100% short of a more aggressive pass on the chip die (doable but very tricky apparently to delayer the protected section)
Especially exact EG settings of the modulator, which is the trickiest to fix imho (the exact EG settings of the carrier can be found really just with counting samples)
Yes our set was gathered from scratch using waveform comparison, spectrum comparison and rapid toggling between instrument 0 and x (listening for glitches or anything not smooth)

Here it is the block of code from our app (was also published in my video), and yes they are also in separate preset xml files in the synth:

// May 15th 2015 Hubert Lamontagne & David Viens
const uint8_t ROM_VRC7[OPLL_INST_MAX][OPLL_INST_SIZE]={
OPLL_USER_INIT_PATCH,
{0x03, 0x21, 0x05, 0x06, 0xC8, 0x81, 0x42, 0x27}, // Buzzy Bell
{0x13, 0x41, 0x14, 0x0D, 0xF8, 0xF7, 0x23, 0x12}, // Guitar
{0x31, 0x11, 0x08, 0x08, 0xFA, 0xC2, 0x28, 0x22}, // Wurly
{0x31, 0x61, 0x0C, 0x07, 0xF8, 0x64, 0x60, 0x27}, // Flute
{0x22, 0x21, 0x1E, 0x06, 0xFF, 0x76, 0x00, 0x28}, // Clarinet
{0x02, 0x01, 0x05, 0x00, 0xAC, 0xF2, 0x03, 0x02}, // Synth
{0x21, 0x61, 0x1D, 0x07, 0x82, 0x8F, 0x10, 0x07}, // Trumpet
{0x23, 0x21, 0x22, 0x17, 0xFF, 0x73, 0x00, 0x17}, // Organ
{0x15, 0x11, 0x25, 0x00, 0x41, 0x71, 0x00, 0xF1}, // Bells
{0x95, 0x01, 0x10, 0x0F, 0xB8, 0xAA, 0x50, 0x02}, // Vibes
{0x17, 0xC1, 0x5E, 0x07, 0xFA, 0xF8, 0x22, 0x12}, // Vibraphone
{0x71, 0x23, 0x11, 0x06, 0x65, 0x74, 0x10, 0x16}, // Tutti
{0x01, 0x02, 0xD3, 0x05, 0xF3, 0x92, 0x83, 0xF2}, // Fretless
{0x61, 0x63, 0x0C, 0x00, 0xA4, 0xFF, 0x30, 0x06}, // Synth Bass
{0x21, 0x62, 0x0D, 0x00, 0xA1, 0xFF, 0x50, 0x08} // Sweep
};
Re: New VRC7 patch set
by on (#224873)
Ah, thanks for posting that set here. I wasn't sure whether it was OK to share that. Here's the differences between your set (left) and the one I posted yesterday (right):

Code:
Patch 1
12 11 M attack

Patch 2
20 19 M output
15 13 M attack
15 13 C attack
 7  6 C decay

Patch 3
12  9 C attack
 2 10 C decay
 8  2 M release
 2  0 C sustain

Patch 4
12 24 M output
15  7 M attack
 6  3 M sustain

Patch 5
15  0 M decay
 0  8 M release

Patch 6
 5  6 M output
10 15 M attack
12  0 M decay
 0 15 C sustain
 2  5 C release

Patch 7
15  1 C decay
 0  6 M release

Patch 8
34 26 M output
15 12 M attack
 3  2 C decay
 0  2 M sustain
 0  5 M release

Patch 9
 1 15 M decay
15  1 C sustain

Patch 10
 1  0 M key rate scale
16 18 M output
11  9 M attack
 8  9 M decay
10  2 C decay
 5  4 M sustain

Patch 11
 1  0 M key rate scale
30 41 M output
10  3 M decay
 8  5 C decay
 2 10 M sustain
 2  7 M release

Patch 12
17 13 M output
 5  7 M decay
 4  5 C decay
 1  2 M sustain
 0  3 M release

Patch 13
15 10 M attack
 8 15 M sustain
 3  7 M release
15  5 C sustain

Patch 14
10  9 M attack
15 10 C attack
 0  4 M release

Patch 15
 0  1 C key rate scale
10 12 M attack
15 10 C attack
15  0 C decay
 0  4 M release
 0  1 C sustain
 8  6 C release


I'll take a closer look at how these differ later.
Re: New VRC7 patch set
by on (#236280)
Exciting news! Apparently a debug mode for the VRC7 was found via pin 15, and a few days ago Nuke.YKT used this to read out the VRC7 patch set:
https://siliconpr0n.org/archive/doku.php?id=vendor:yamaha:opl2#ym2413_instruments
Code:
1: $03 $21 $05 $06 $E8 $81 $42 $27
2: $13 $41 $14 $0D $D8 $F6 $23 $12
3: $11 $11 $08 $08 $FA $B2 $20 $12
4: $31 $61 $0C $07 $A8 $64 $61 $27
5: $32 $21 $1E $06 $E1 $76 $01 $28
6: $02 $01 $06 $00 $A3 $E2 $F4 $F4
7: $21 $61 $1D $07 $82 $81 $11 $07
8: $23 $21 $22 $17 $A2 $72 $01 $17
9: $35 $11 $25 $00 $40 $73 $72 $01
A: $B5 $01 $0F $0F $A8 $A5 $51 $02
B: $17 $C1 $24 $07 $F8 $F8 $22 $12
C: $71 $23 $11 $06 $65 $74 $18 $16
D: $01 $02 $D3 $05 $C9 $95 $03 $02
E: $61 $63 $0C $00 $94 $C0 $33 $F6
F: $21 $72 $0D $00 $C1 $D5 $56 $06


I have verified this myself using the hotswap patch test ROM I wrote. I'm willing to call this a complete and correct patch dump.

The only thing that doesn't match perfectly in my side by side recordings is the patches using the vibrato LFO, which don't match phase. I thought I could reset LFO by writing $40 then $00 to $E000 (with some delays in between), but I'm not sure if this affects the vibrato LFO? It does seem to work for tremolo... unless I'm just getting incredibly lucky with timings... at any rate I don't think that matters in terms of patch correctness, since LFO phase is normally free running and not something that would be affected by patch data anyway. Edit: investigated further and discovered you can only reset tremolo LFO, but not vibrato LFO, so getting vibrato phase to match in a recording would be difficult... maybe some very carefully timed delays could align them?

Here's the parameterized diff vs. my last set. (Mine on the left, the new dump on the right.)
Code:
A: rainwarrior_2.vrc7
B: nukeykt.vrc7

Patch 1
11 14 M attack

Patch 2
19 20 M output
13 15 C attack

Patch 3
 1  0 M hold sustain
 9 11 C attack
10  2 C decay
 2  0 M release
 0  1 C sustain

Patch 4
24 12 M output
 7 10 M attack
 3  6 M sustain
 0  1 M release

Patch 5
 0  1 M key rate scale
15 14 M attack
 0  1 M decay
 8  1 M release

Patch 6
15 10 M attack
 0  3 M decay
15 14 C attack
 0 15 M sustain
 3  4 M release
 5  4 C release

Patch 7
 6  1 M release

Patch 8
26 34 M output
12 10 M attack
15  2 M decay
 2  0 M sustain
 5  1 M release

Patch 9
 0  1 M hold sustain
15  0 M decay
 1  3 C decay
 0  7 M sustain
 0  2 M release
 1  0 C sustain

Patch 10
 0  1 M hold sustain
 0  1 M key rate scale
18 15 M output
 9 10 M attack
 9  8 M decay
 2  5 C decay
 4  5 M sustain
 0  1 M release

Patch 11
 0  1 M key rate scale
 1  0 M key level scale
41 36 M output
 3  8 M decay
 5  8 C decay
10  2 M sustain
 7  2 M release

Patch 12
13 17 M output
 7  5 M decay
 5  4 C decay
 2  1 M sustain
 3  8 M release

Patch 13
10 12 M attack
 3  9 M decay
 2  5 C decay
15  0 M sustain
 7  3 M release
 5  0 C sustain

Patch 14
10 12 C attack
15  0 C decay
 4  3 M release
 0 15 C sustain

Patch 15
10 13 C attack
 0  5 C decay
 4  6 M release
 1  0 C sustain
Re: New VRC7 patch set
by on (#236298)
Wonderful! Now the only impediment to perfect VRC7 bliss is correct emu2413's annoying "ladder" effect that exaggerates the quantization noise compared to the available hardware recordings.
Re: New VRC7 patch set
by on (#236301)
HELL. YEAH. :twisted:

Now if I could just find the time to update my damn emulator...
Re: New VRC7 patch set
by on (#236351)
Nuke.KYT also dumped the 3 drum patches from the VRC7 (yes, the vrc7 has drums in debug mode, but before you get excited, they don't seem to produce any sound on any of the pins, since it seems like the VRC7 doesn't have an RO pin like the YM2413/OPLL does, but if you try to trigger the drums their patches do show up in the debug registers, so the VRC7 must still be trying to play them. Maybe the VRC7 still has the YM2413/OPLL's instrument vs rhythm analog multiplexer, just with the rhythm output either connected nowhere, or to an unbonded pad inside the package. The drum patches are probably the same ones that the YM2413/OPLL has.)

The patches are:
Code:
BD   : $01 $01 $18 $0F $DF $F8 $6A $6D
HH,SD: $01 $01 $00 $00 $C8 $D8 $A7 $68
TM,TC: $05 $01 $00 $00 $F8 $AA $59 $55


(side note: if you ground pin 15 of the VRC7 to enable the debug mode, it enables all 9 channels, so you get an extra 3 FM-only channels which DO produce sound!)


Another random thing that was discovered by ValleyBell in the past day or so, in a forum post that's been sitting around since 2007: https://www.msx.org/forum/development/m ... sic?page=1
This explains what two bits in the 0x0F 'TEST' register do:
Code:
TEST (0x0F)
   76543210
   |||||||\- DAC test enable (enables DAC output from the top 4 bits of address 0x10 (0x10 is normally the frequency LSB bits for channel 0)
   ||||||\-- ?
   |||||\--- ?
   ||||\---- This bit, if set, silences the FM sound output. How exactly is unknown. (On YM2151 at least, this bit freezes the phase counters and lfo counters)
   |||\----- ?
   ||\------ ?
   |\------- ?
   \-------- ?

Whether this works on the VRC7 or not (since the post is targeting the YM2413/OPLL) is unclear, but I'm guessing it probably does.

Questions I have:
Does TEST bit 0 make the other DAC bits accessible in 4 bit blocks on 0x11, 0x12, etc? Does it change anything else?
What do the other TEST bits do? On YM2151, TEST bit 1 halts the LFO if high, and resets the LFO to zero on a 1->0 transition, so this may be worth checking if it does the same thing here (perhaps this is the 'real' way to reset the AM LFO?)

LN
Re: New VRC7 patch set
by on (#236360)
How difficult do you think it would be to adopt Nukey's method for the original YM2413? That chip's patch set has yet to be dumped. It seems like, according to the wiki, that grounding the debug pin on the VRC7 seems to turn some of it's other pins into the bus control lines available on the YM2413. If that is the case, then the YM2413's test mode should be just as easy to access as the VRC7's.
Re: New VRC7 patch set
by on (#236361)
Lord Nightmare thanks for that info! I will definitely give it a test in the future. Actually looking again at the YM2413 datasheet and it really does list $0F as "T E S T" / "OPLL test data", though it doesn't give any more information than that. Very interesting!

Great Hierophant wrote:
How difficult do you think it would be to adopt Nukey's method for the original YM2413? That chip's patch set has yet to be dumped. It seems like, according to the wiki, that grounding the debug pin on the VRC7 seems to turn some of it's other pins into the bus control lines available on the YM2413. If that is the case, then the YM2413's test mode should be just as easy to access as the VRC7's.

The YM2413 doesn't have any suspicious free pins like the VRC7 did though, so if there does exist an equivalent "debug" mode, it might be trickier to figure out how to activate it. It sounded like nobody's decapped a YM2413 yet...
Re: New VRC7 patch set
by on (#236364)
Great Hierophant wrote:
How difficult do you think it would be to adopt Nukey's method for the original YM2413? That chip's patch set has yet to be dumped. It seems like, according to the wiki, that grounding the debug pin on the VRC7 seems to turn some of it's other pins into the bus control lines available on the YM2413. If that is the case, then the YM2413's test mode should be just as easy to access as the VRC7's.


I don't think it will be as easy.
The YM2413 has far fewer pins than the VRC7 does (just 18 pins total), so I don't believe there is a pin that the debug mode could easily 'hide' behind. However, the YM2413 application manual ( http://www.smspower.org/uploads/Develop ... 2413am.pdf pdf page 6, document page 3) DOES state that there is a debug/test mode involving pins D0 and D1 becoming outputs, if /CS is low(active), /WE is high(inactive) and A0 is low. If, in this mode, D2 thru D7 are still inputs, that means D2-D7 can select between 64 different pairs of bits to be 'visible' on D0 and D1, for 128 bits of internal state visible. The test mode of the VRC7 (described at https://pastebin.com/2gAwGmFT ) gives 40 bits of internal state. Each patch is 64 bits, but the two operators for each channel, modulator and carrier, happen one after the other, so you see only half the data (some of it common for modulator/carrier) for each patch at a time, sequentially for all the channels. (what the exact order is of this data vs the channel number, I'm not sure.)
So 128 bits, if D2-D7 really work that way, is more than enough data to hold not only all 40 bits of the 'current patch state', but also other fun stuff like the current phase count, current envelope count, bits having to do with the envelope position and key-on, etc. Even if it turns out only 64 bits are available, that's still enough for 40 patch bits plus 24 other bits.

Also, for this debug/test mode on the YM2413/OPLL, does changing A0 have any effect? The document seems ti imply that if /CS is low, /WE is high and A0 is high, the data bus is high impedance/disconnected, but this could use testing as well.

LN
Re: New VRC7 patch set
by on (#236371)
Some info about VRC7's test register(0x0f):
Code:
Test register:
Bit 0: EG output mute
Bit 1: Set next noise bit to 1, Reset/Halt LFO(both tremolo and vibrato)
Bit 2: PG halt/reset
Bit 3: Update tremolo and vibrato every sample(i.e tremolo is 64 times faster and vibrato is 1024 times faster than normal), custom EG timer value input via D2 pin

This info was gathered by analyzing VRC7 die shot and i haven't tested it on hardware so this info might be incorrect. I don't know if this info also can be applied for YM2413.

Also VRC7 has it's own way to test DAC. You need to set VRC7 to debug mode, connect pin 2 to ground and pin 47 to +5v(or vice versa, not 100% sure). Then you just need to write 8 bit sample to VRC7(any port, A0 is ignored)
Re: New VRC7 patch set
by on (#236377)
So I wrote a simple hotswap test (test_vrc7) to verify that theory.

I've attached a recording of the test ROM. It plays a 3 second reference tone, then a series of 8 tones where it's on for 1 second, sets a $0F bit for 1 second, then clears the $0F bit for 1 second, then release. After that it plays 3 tones after toggling bit 1, then 3 tones without doing that to show that it can reset LFO. The test is done twice, once with instrument 10 (demonstrates tremolo), and again with instrument 12 (demonstrates vibrato).

So the observed effects from the recording:
  • bit 0 - tone goes very noisy/buzzy (feedback?) and is maybe stuck at full volume (envelope appears to have continued on through this period though, when it resumes it has already fallen to where it should be)
  • bit 1 - LFO immediately stops, seems like it's resetting immediately to 0 and not just halting
  • bit 2 - Tone goes silent, envelope seems to have continued through.
  • bit 3 - With instrument 10 it makes a mild rapid buzz and with instrument 12 it seems like the vibrato is halted (but if it's 1024x speed it's maybe just so fast it sounds flat). By the envelope curve of instrument 10 it looks like the envelope is paused while this bit is set, and does not resume until it is cleared? (Instrument 12 has a flat envelope after 1s so this effect isn't noticeable in the second test.)
  • bit 4-7 no effect

Also, toggling bit 1 does indeed seem to reset both LFOs, which is great! Finally a technique that works for that. :)

Edit: so compared to your description... what does the "next noise bit" mean? And was this maybe attached to bit 0 rather than bit 1 of this $0F register, explaining the buzzy/feedback-style noise? The other 3 seem to correspond to your description validly, though I guess I don't know what the bit 3 function of D2 you described to clock the EG is... but it does seem that EG is effectively halted by it for this test so that seems to corroborate?
Re: New VRC7 patch set
by on (#236387)
Updated my patch_vrc7 hotswap test ROM with a few extra attempts to get the LFOs synchronized, etc. with this new information.

Made a reference recording using the new patch set, in case anyone wants to see/hear how perfect it is. ;) (I'm still kinda shocked by finally having this data!)

http://rainwarrior.ca/projects/nes/patch_vrc7_nukeykt.flac (39MB FLAC)
Re: New VRC7 patch set
by on (#236408)
rainwarrior wrote:
Edit: so compared to your description... what does the "next noise bit" mean? And was this maybe attached to bit 0 rather than bit 1 of this $0F register, explaining the buzzy/feedback-style noise? The other 3 seem to correspond to your description validly, though I guess I don't know what the bit 3 function of D2 you described to clock the EG is... but it does seem that EG is effectively halted by it for this test so that seems to corroborate?


I was a bit unclear/wrong with bit 0. it just disables EG output and zero attenuation value is sent to operator unit(i.e operator outputs at full volume).
In bit 1 description i meant rhythm mode's noise generator(23 bit LSFR) which doesn't affect melodic channels.
Bit 3 allows to serially input EG timer value, but you need to write it at the rate of MCLK/4, so if don't write anything to it, or write with wrong timing EG will basically stuck.
Re: New VRC7 patch set
by on (#236416)
Oh, the noisiness with bit 0 set is just the modulator being forced to full strength isn't it. Ah, okay.