Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /storage/content/49/145849/famitracker.com/public_html/forum/classes/dbHandler.php on line 29 FamiTracker
Login:
Menu:
Post: Author:
FamiTracker > General > Bug Reports & Feature Requests > VRC7 custom patch bug Owner: rainwarrior New post
Page 1 of 1 Sort:  
VRC7 custom patch bug Posted: 2012-06-27 02:40  (Last Edited: 2012-06-27 02:43) Reply | Quote
rainwarrior

Avatar

Member for: 4150 days
Location: Canada
Status: Offline

#36160
jrlepage discovered this; only a problem on hardware because emulators don't account for it, but the VRC7 custom patch loading code (which is in instrument.s instead of vrc7.s) does not have a sufficient delay between writing $9010 and $9030, so the custom patch registers tend not to get set properly.

After sticking a pair of [i]jsr ft_vrc7_delay[/i] lines into intrument.s, it runs fine on jrlepage's machine.


Additionally, it might be prudent to put in a register init for the VRC7 at (i.e. write 0s to all registers) at the end of ft_music_init, since in my tests the hardware registers have not been consistently 0 on reset.

Posted: 2012-07-16 02:52 Reply | Quote
jsr
Administrator

Avatar

Member for: 5924 days
Location: Sweden
Status: Offline

#36821
Thanks for finding this, I've fixed the NSF driver.

_______________________
Programmer and developer
Posted: 2012-07-20 07:47 Reply | Quote
jrlepage
Moderator

Avatar

Member for: 4983 days
Location: Canada
Status: Offline

#36979
I noticed an odd thing. rainwarrior made a custom build of the 0.3.7 executable with the driver fix, and all works 100% fine on hardware. Beta 5 did indeed solve the VRC7 timing issue (thanks!), but I still get another issue I had with other versions, which is that sometimes the 2A03 squares' duty changes to 12.5% randomly.

Here's a comparison between the [url=http://www.mediafire.com/?5spyny55yn2ypa4]correct export and the [url=http://www.mediafire.com/?v64jsggl4doesb9]incorrect one. You can also download the [url=http://www.mediafire.com/?tud1bp0fqa9c83i]correct NSF and the [url=http://www.mediafire.com/?m2bor8u81cidsn9]incorrect one, if you need to, as well as the [url=http://www.mediafire.com/?lo50l44kd9p3oab]FTM.

_______________________
Follow me on [url=https://twitter.com/jrlepage2a03]Twitter.
I record (some) NSFs on hardware. Feel free to [url=http://www.famitracker.com/forum/posts.php?id=3633]request a hardware render.
Posted: 2012-07-23 02:16 Reply | Quote
jsr
Administrator

Avatar

Member for: 5924 days
Location: Sweden
Status: Offline

#37049
I found the problem in the new driver. Thanks again!

_______________________
Programmer and developer
Posted: 2012-07-23 03:26 Reply | Quote
modusponens

Avatar

Member for: 4743 days
Location: Redmond, WA
Status: Offline

#37056
I don't know to what degree an issue I'm having is related to this one, but it is a VRC7 custom patch-related bug, so I might as well bring it up here.

A while back I made this FTM that uses custom VRC7 patches. Track #1, Anubis, sounds fine in FT, but an exported NSF has some weirdness in it. Both files are attached. A slight discrepancy between the sounds of the FTM and the NSF is noticeable as early as the end of frame 02 (about the nine-second mark in the NSF), but it's much more clearly wrong at the end of frame 06 (about 29 seconds into the NSF).

I recall reading about some limitation or another regarding custom VRC7 patches, but I don't remember what it was. I figured, since it sounded fine in the tracker, it would probably export fine too.

It is notable that I exported this NSF using BETA 5 (July 16 2012).

_______________________
All men are mortal.
Socrates is a man.
Therefore, all men are Socrates.
Attachments:
gungnir_ost.nsf (13 Kb)
gungnir_ost.ftm (27 Kb)
Posted: 2012-07-23 04:27  (Last Edited: 2012-07-23 04:28) Reply | Quote
rainwarrior

Avatar

Member for: 4150 days
Location: Canada
Status: Offline

#37058
VRC7 playback varies a lot between NSF players. NSFPlay and Famitracker are at this point pretty close (using the same VRC7 code, mostly); others may have other kinda different patch sets or emulation. (It is the least consistently emulated expansion chip.)

What are you playing the NSF in, and how are you comparing it to the FTM? If you import the FTM via NSF importer, does it sound like you expect again?

Posted: 2012-07-23 07:04  (Last Edited: 2012-07-23 07:07) Reply | Quote
jrlepage
Moderator

Avatar

Member for: 4983 days
Location: Canada
Status: Offline

#37062
Oh god... Hardware playback is [url=http://www.mediafire.com/?prdvk1zk8l2w3k2]even worse!

It appears that the bit you pointed to at the 29 seconds mark, it seems to be reading from default patch #14 and writing that as the default instrument. But more importantly, your bass drum patch plays completely wrong all along! Toms seem to be fine though, for some reason...

_______________________
Follow me on [url=https://twitter.com/jrlepage2a03]Twitter.
I record (some) NSFs on hardware. Feel free to [url=http://www.famitracker.com/forum/posts.php?id=3633]request a hardware render.
Posted: 2012-07-23 10:57 Reply | Quote
modusponens

Avatar

Member for: 4743 days
Location: Redmond, WA
Status: Offline

#37078
(Yay, JR did a hardware recording of one of my songs....)

So, I tried it out in NSFplug and NotSoFatso, with seemingly identical results in both cases. Just now I tried importing the NSF into your tool, rainwarrior, and at first it seemed like it was going to be fine, but the sneaky 29-second issue was certainly present.

Also, I'm not sure I understand perfectly what you mean when you ask how I'm comparing it to the FTM, but when I play the FTM in FamiTracker (any version) it sounds the way I want it to sound — presumably the way it would sound to you on your own computer — and when I play the NSF in the above-mentioned programs, it sounds quite wrong.

Posted: 2012-07-23 11:01 Reply | Quote
jrlepage
Moderator

Avatar

Member for: 4983 days
Location: Canada
Status: Offline

#37079
I think part of it is FamiTracker emulating the VRC7 wrong, and part of it is an issue with the exporter. The kick drum definitely sounds like that on real hardware. The shoddy fill 29 seconds in seems to be an export issue - like I said, it seems to me like it's reading custom instrument data from default patch 14, as opposed to the one you defined in the FTM. Very odd indeed.

_______________________
Follow me on [url=https://twitter.com/jrlepage2a03]Twitter.
I record (some) NSFs on hardware. Feel free to [url=http://www.famitracker.com/forum/posts.php?id=3633]request a hardware render.
Posted: 2012-07-23 20:03 Reply | Quote
jsr
Administrator

Avatar

Member for: 5924 days
Location: Sweden
Status: Offline

#37107
I checked this too now and the problem is caused by the custom patch register not being written to properly. I'm working on it now.

_______________________
Programmer and developer
Posted: 2012-07-24 15:23 Reply | Quote
za909

Avatar

Member for: 3962 days
Location: Hungary
Status: Offline

#37167
It isn't unintentional and it's probably how the chip works, but the Carrier and the modulator seem to be in slightly different pitches all the time and there's a very slow phasing effect for certain notes, is that normal?

_______________________
Rectangular sh*t ©
Posted: 2012-07-26 00:58 Reply | Quote
jsr
Administrator

Avatar

Member for: 5924 days
Location: Sweden
Status: Offline

#37222
I'm not sure what you mean, can you provide an example?

_______________________
Programmer and developer
Page 1 of 1 Sort: