I recently got my hands on a Gimmick cartridge in hopes that it would work with my TNS-HFC5 and TNS-HFX4. Unfortunately, all that happens is that when I turn it on, the chip's noise starts playing, crescendoing, regardless of what nsf is playing. During nsf's with actual 5B expansion music nothing changes, and there aren't any square waves or tones. Is this a lost cause? If it is, is there some other possible way to have a 5B chip play back audio?
If the sound plays correctly during Gimmick! then it's perfectly possible to use the expansion audio by other means. I've played tunes through my Gimmick! cart by hotswapping or using the CopyNES.
Does the TNS-HFC5 or TNS-HFX4 actually support the 5B? I can't read Japanese very well, but the website description seems to suggest that they do not support the 5B cartridge directly, but instead offer an option for an equivalent chip on the TNS board?
I can verify that the HFX4 board doesn't support the Gimmick cart. You'll have to get the YMZ294 chip or add wires from that socket to the cart.
Jedi QuestMaster wrote:
It works for ImATrackMan
I talked to him about it. He's not using a Gimmick! cart. He's just got an equivalent chip that fits into the TNS board.
rainwarrior wrote:
Jedi QuestMaster wrote:
It works for ImATrackMan
I talked to him about it. He's not using a Gimmick! cart. He's just got an equivalent chip that fits into the TNS board.
Good to know!
Does a Gimmick! cart work with
any of the TNS boards?
@rainwarrior
Thanks for the reply. What is hotswapping and CopyNES? I'm completely inadequate when it comes to hardware or software admittedly I'm just a middleware-using musician so I appreciate all you guys are doing.
Edit: My Japanese is very subpar, but I agree that the website and directions seems to indicate that the YMZ249 is the only compatible 5B hardware it was designed for...
@jsr
Is it possible then to do it with something like this?
applesource These directions say that this schematic renders the cartridge compatible with the TNS-HFC3. I definitely wouldn't want to tamper with the actual Gimmick cart, maybe I can try my luck at finding a 5B in some cheaper Sunsoft cartridge...
tadashibashi wrote:
These directions say that this schematic renders the cartridge compatible with the TNS-HFC3.
I'm about 90% certain that they're only describing how to modify a PCB {that happens to contain a 5B but is not Gimmick!} to connect the 5B's audio output to the cartridge edge... unless removing the ROMs is all that is necessary to make it work with the HFC series...
Hotswapping is writing a program that copies itself to RAM and runs from there, running it on my Famicom, yanking out the cartridge (i.e. powerpak), then jamming in Gimmick. The program will still be running (usually) and I can then get it do stuff with Gimmick in place.
CopyNES is an NES modification that lets you attach it to a PC and control it from there. You can use that to play NSFs through your NES via computer control, rather than running them from a cartridge. If you put Gimmick in, you can use its sound hardware.
rainwarrior wrote:
Hotswapping is writing a program that copies itself to RAM and runs from there, running it on my Famicom, yanking out the cartridge (i.e. powerpak), then jamming in Gimmick. The program will still be running (usually) and I can then get it do stuff with Gimmick in place.
CopyNES is an NES modification that lets you attach it to a PC and control it from there. You can use that to play NSFs through your NES via computer control, rather than running them from a cartridge. If you put Gimmick in, you can use its sound hardware.
Thanks for the info rainwarrior. CopyNES sounds like a very powerful tool, though it's a bit outside of my range of money, time, and skill at the moment (I'd have to buy everything but the Gimmick cart, and I'd probably feel obligated to spend a ton of time messing with and learning about the other functionality.)
Also, have you by chance looked at that schematic from the link I posted? Do you think that will work if I somehow find another Sunsoft 5b? Do you know how rare it is to find in Batman/Gremlins2?
PS: One more question, have you beaten Gimmick? haha it's so tough
I'm not the best person to ask about the schematic; I'm pretty slow with electrical engineering stuff. I'm sure there are a lot of other people on this board who could evaluate it more quickly and accurately than I can.
I don't know how often 5B were used in other carts besides Gimmick. I've heard of a 5B appearing in Gremlins once before, and this article is the second one I've seen (and also a Batman). I have no idea if this is like 50% or 10% or what, but I think you're more likely to find 5A or FME-7 in them.
I've beaten Gimmick many times! I even took a video:
https://www.youtube.com/watch?v=nZX6DYe3ffU
The pictures and schematic on the applesorce link are definitely only adding the audio path to the GRM-E301 PCB.
It's possible there's some other detail in the Japanese text, but I'd be surprised.
tadashibashi wrote:
Is it possible then to do it with something like this?
applesource These directions say that this schematic renders the cartridge compatible with the TNS-HFC3. I definitely wouldn't want to tamper with the actual Gimmick cart, maybe I can try my luck at finding a 5B in some cheaper Sunsoft cartridge...
That schematic seems to add audio to 5B carts which didn't already utilize audio, as mentioned. The problem with the HFX board is that register writes aren't routed to the cart connectors, only the YMZ socket.
YMZ294 are available from ebay and aren't expensive, that's the easiest way to get 5B expansion audio working.
jsr wrote:
tadashibashi wrote:
Is it possible then to do it with something like this?
applesource These directions say that this schematic renders the cartridge compatible with the TNS-HFC3. I definitely wouldn't want to tamper with the actual Gimmick cart, maybe I can try my luck at finding a 5B in some cheaper Sunsoft cartridge...
That schematic seems to add audio to 5B carts which didn't already utilize audio, as mentioned. The problem with the HFX board is that register writes aren't routed to the cart connectors, only the YMZ socket.
YMZ294 are available from ebay and aren't expensive, that's the easiest way to get 5B expansion audio working.
Hmm, I see, I just ordered one.
Is there no way to arrange a connection between the YMZ socket and the Gimmick cartridge pins? I feel like since I have an actual 5B I should exhaustively find a way to use it. How accurate is the YMZ294 in emulating the actual 5B btw?
The sunsoft 5B includes something that is identical to a YMZ284/294. (Rainwarrior has exhaustively tested)
This isn't the fetid pile of incorrectness that is the VRC7 vs the YM2413 as on the HFX4.
lidnariq wrote:
The sunsoft 5B includes something that is identical to a YMZ284/294. (Rainwarrior has exhaustively tested)
This isn't the fetid pile of incorrectness that is the VRC7 vs the YM2413 as on the HFX4.
I see, I guess it's just a Gimmick to play it back with a real 5b
I would still be really psyched to find out a way to come up with a schematic to connect those pins. It would make the Gimmick purchase worth it to me. Probably just need to buy a 3rd party cartridge slot after getting some help with the wiring schematic.
Well, the YMZ294's inputs are /WR, /CS, A0, Vdd, SO, Gnd, φM, 4/6, /IC, an eight-bit data bus, and /TEST. only SO is an output; everything else is a power supply or logic input.
The SS5B has a bunch more pins, but we can ignore all the digital outputs... tie SS PPU A10..A13 and SS PPU /RD high, connect data bus, SS R/W low (or to YMZ /WR) ... YMZ /CS to SS /ROMSEL, SS CPU A14 high, SS CPU A13 to YMZ A0, SS M2 to YMZ φM... No promises it'd work, 't's just an educated guess.
I still need to do some work to characterize the 5B's audio amplifier response. While the behaviour of the chip matches the YM2149* perfectly, as far as I've tested it, the actual amplification is separate and unique to the 5B. In particular, I believe it has a hard clipping behaviour when the amplitude of the input signals gets loud enough. I doubt the TNS boards make any attempt to recreate this, from what I know about them.
* The YMZ294 is just a reduced-pin variant of the YM2149, from what I understand. I've never worked with one directly.
jsr wrote:
YMZ294 are available from ebay and aren't expensive, that's the easiest way to get 5B expansion audio working.
I noticed that they're all from the same seller: utsource. And they're located in China. Have there been any instances of 'fake' YM sound chips?
lidnariq wrote:
Well, the YMZ294's inputs are /WR, /CS, A0, Vdd, SO, Gnd, φM, 4/6, /IC, an eight-bit data bus, and /TEST. only SO is an output; everything else is a power supply or logic input.
The SS5B has a bunch more pins, but we can ignore all the digital outputs... tie SS PPU A10..A13 and SS PPU /RD high, connect data bus, SS R/W low (or to YMZ /WR) ... YMZ /CS to SS /ROMSEL, SS CPU A14 high, SS CPU A13 to YMZ A0, SS M2 to YMZ φM... No promises it'd work, 't's just an educated guess.
Hey thanks for your time, though I'm extremely hesitant about opening and accidentally damaging my Gimmick cart and I really don't want to modify it in any way. Do you think there might be some way to connect the YMZ socket to the game cartridge itself using a 3rd party cartridge connector?
I looked at the bottom of the TNS board and there is a series of connections from each cartridge connector slot and YMZ/YM sockets originating from the TNS-HFC5. Pictured below, YMZ's pins 11-18 Data bus (D0-D7) are connected to their respective cartridge pins 37-43 (CPU D0-D7).
TNS-HFX4 bottom side, picturing Cartridge Connector 4 (farthest out from TNS-HFC5 data input), and YMZ294 Socket
(I know it's impossible to see the fine details, my only camera has a really low resolution, but hopefully this helps keep us on the same page)
The only discrepancies I see are:
-the cartridges also receive data from pins 2-15 (CPU A0-A11) and 32 (M2), and 33 (CPU A12) which the YMZ seems to have no involvement with.
-YMZ pin 8 (Clock Select) has 2 small gold squares next to it with which it's connected to one visibly. There is a notation that reads "R2" which I'm guessing means it's a resistor?
-The cartridges also receive 2a03 audio input (pin 45), and sends audio to RF (pin 46), which both have resistors that lead to the mixing board on the opposite side of the board. The YMZ has pin 5 Sound Out but it seems like there is no audio input (I guess cart pin 46 would connect to YMZ pin 5 ?) Also there is no visible connection between YMZ pin 5 and the mixing board from the bottom, but there may be on the top; everything up there is more ambiguous since I can't see the direct connection to the socket since the socket itself is hiding it from view. For that reason there are probably some connections I'm unaware of since I'm just going by visual common sense rather than actual electrical knowledge.
tadashibashi wrote:
the cartridges also receive data from pins 2-15 (CPU A0-A11) and 32 (M2), and 33 (CPU A12) which the YMZ seems to have no involvement with.
Missing M2 is a little weird... the YMZ needs a clock source. What's YMZ294 pin 7 connected to?
Quote:
YMZ pin 8 (Clock Select) has 2 small gold squares next to it with which it's connected to one visibly. There is a notation that reads "R2" which I'm guessing means it's a resistor?
But not populated. The YMZ294 has the option to use an internal frequency divider; in the SS5B that divider is always enabled. (This drops all sounds by an octave, moving the inadvertent "envelope bass" mostly out of the audible range)
Quote:
The cartridges also receive 2a03 audio input (pin 45), and sends audio to RF (pin 46), which both have resistors that lead to the mixing board on the opposite side of the board. The YMZ has pin 5 Sound Out but it seems like there is no audio input (I guess cart pin 46 would connect to YMZ pin 5 ?)
The SS5B mixes the audio from the FC (ignored on the TNS cartridges, I think?) and then uses an on-die amplifier. The YMZ294 doesn't have this amplifier, but I'm not clear if you'll need it.
Quote:
For that reason there are probably some connections I'm unaware of since I'm just going by visual common sense rather than actual electrical knowledge.
Using a continuity meter will help. If you don't have one (such as part of a multimeter) lying around, I've made a super-cheap one out of a AA battery, a pair of headphones, and a 10kΩ resistor—you'll hear a click any time you make or break contact.
It's going to be hard to get you better instructions without having either the TNS schematic or good enough access/pictures to the hardware to recreate the relevant portion of the schematic.
Quote:
Quote:
tadashibashi wrote:
the cartridges also receive data from pins 2-15 (CPU A0-A11) and 32 (M2), and 33 (CPU A12) which the YMZ seems to have no involvement with.
Missing M2 is a little weird... the YMZ needs a clock source. What's YMZ294 pin 7 connected to?
I see, it might be that I just don't have a good enough info of the HFX4 schematic. Pins 1-9 on the bottom have no visible connections to anything, but there may be some connections on top that I am unaware of due to my lack of experience with continuity meters. As for getting that schematic, I think Terra Network Systems seems extremely guarded, it's written all over the instructions that there is no support outside of Japan, which would be cool to be able to live in, (not just for this), and I can't pretend I do either since my Japanese sucks even though I'm Japanese haha but I digress
Overall, this seems to be outside my current level of capability. Thanks for your help tho!
Maybe I'll look into copyNES, or I'll let you know if I ever find a non-Gimmick SS5B chip to work with.
@also rainwarrior: It's too bad TNS-HFX4 doesn't take 2a03 mixing for YMZ/5B into consideration, which is what you were mentioning earlier which makes 5B's sound subtly unique (compared to YMZ294) right? Maybe copyNES is the best solution afterall...
Well, ok, as a final guess, I'd hope something like the following is true of the YMZ294 socket:
pin 1 = /WR = connected to ground or to R/W (cartridge pin 14)
pin 2 = /CS = connected to /ROMSEL
pin 3 = A0 = hopefully connected to CPU A13 (cartridge pin 34)
pin 4 = Vdd
pin 5 = SoundOut - probably not connected at all
pin 6 = Gnd
pin 7 = φM = connected to M2 (cartridge pin 32)
pin 8 = 4/6 = pulled to ground through a resistor somewhere
pin 9 = /IC = pulled high through a resistor, unless there's explicit reset circuitry somewhere
IF all the above are true, then I'm not clear why just plugging Gimmick! in isn't working.
tadashibashi wrote:
@also rainwarrior: It's too bad TNS-HFX4 doesn't take 2a03 mixing for YMZ/5B into consideration, which is what you were mentioning earlier which makes 5B's sound subtly unique (compared to YMZ294) right? Maybe copyNES is the best solution afterall...
Well, not really, unless you install a CopyNES in a Famicom. You can mod an NES for expansion audio, but the mixing doesn't loop the 2A03 audio through the cartridge like the Famicom does, so you don't get exactly the same situation (5B is mixed separately by itself), though it can be very close. If the 2A03 audio signal is supposed to go through the 5B's amplifier, it could be a bit different. This is a bit unknown to me at the moment, I plan to do some discovery work on this later on this year.
rainwarrior wrote:
Well, not really, unless you install a CopyNES in a Famicom.
Have you installed copyNES on your Famicom? (I saw that you have one on your Gimmick run.)
I currently have an AV Famicom, but am not familiar with the similarities and differences between NES, Famicom, and AV Famicom to safely make the installation.
Quote:
If the 2A03 audio signal is supposed to go through the 5B's amplifier, it could be a bit different. This is a bit unknown to me at the moment, I plan to do some discovery work on this later on this year.
Good luck!
No, my CopyNES is in my NES. Installing it means desoldering and removing the 2A03 CPU, replacing this with a socket, then sticking the CopyNES device in that socket, and then the CPU goes into a socket in the CopyNES device.
The shape of the CopyNES board is designed to fit in an NES case. If you put it on a Famicom or a Top Loader, I think you'd basically have to build a new case to put them in. I dunno whether you could make a different CopyNES PCB that fits, but there's a lot less room in either of those.
Quote:
No, my CopyNES is in my NES. Installing it means desoldering and removing the 2A03 CPU, replacing this with a socket, then sticking the CopyNES device in that socket, and then the CPU goes into a socket in the CopyNES device.
I see, would you then have to use a 60 to 72 pin converter to put Gimmick in? How did you get it to play back with Gimmick exactly?
I know I would need to put a resistor somewhere to get the NES to playback expansion audio. I'll look it up after getting an NES.
Quote:
The shape of the CopyNES board is designed to fit in an NES case. If you put it on a Famicom or a Top Loader, I think you'd basically have to build a new case to put them in. I dunno whether you could make a different CopyNES PCB that fits, but there's a lot less room in either of those.
Okay, I think going down the NES path is probably most practical then.
Yes, I use a converter I got from Gyromite, and modded the converter to route the audio to the same expansion pin used by the PowerPak so it works with the NES audio mod.
tadashibashi wrote:
@also rainwarrior: It's too bad TNS-HFX4 doesn't take 2a03 mixing for YMZ/5B into consideration, which is what you were mentioning earlier which makes 5B's sound subtly unique (compared to YMZ294) right? Maybe copyNES is the best solution afterall...
I think you can safely ignore that difference, though I haven't checked it in detail myself yet. As far as I know there's only amplification done on the sunsoft cart (other carts have filtering for example), and that can be adjusted using the mixing knobs on the HFX board. There might be clipping on loud levels (similar to the VRC7 cart) as rainwarrior mentioned, that's something I also want to investigate myself.
Since you have the Gimmick cart it'll be easy to adjust the mixing levels, play a Gimmick NSF rip and keep adjusting until it sounds the same as the Gimmick cart (there's a sound test mode in Gimmick, hold select and press start in the main menu). Then you'll also be able to evaluate any audible differences between the YMZ and 5B chip.
jsr wrote:
tadashibashi wrote:
@also rainwarrior: It's too bad TNS-HFX4 doesn't take 2a03 mixing for YMZ/5B into consideration, which is what you were mentioning earlier which makes 5B's sound subtly unique (compared to YMZ294) right? Maybe copyNES is the best solution afterall...
I think you can safely ignore that difference, though I haven't checked it in detail myself yet. As far as I know there's only amplification done on the sunsoft cart (other carts have filtering for example), and that can be adjusted using the mixing knobs on the HFX board. There might be clipping on loud levels (similar to the VRC7 cart) as rainwarrior mentioned, that's something I also want to investigate myself.
Since you have the Gimmick cart it'll be easy to adjust the mixing levels, play a Gimmick NSF rip and keep adjusting until it sounds the same as the Gimmick cart (there's a sound test mode in Gimmick, hold select and press start in the main menu). Then you'll also be able to evaluate any audible differences between the YMZ and 5B chip.
Thanks for the advice jsr, I was actually just doing that with all the chips over the past couple days. All chips ready to go! I'm not sure if there's any discrepancy between HFX boards but I can post the mixing levels. Maybe someone can share me theirs to confirm.
(I think just for sake of novelty, I might try to mod an NES some time in the future to run an nsf through Gimmick)
rainwarrior wrote:
...I believe it has a hard clipping behaviour when the amplitude of the input signals gets loud enough...
...I doubt the TNS boards make any attempt to recreate this...
The HFC5 clips a few of the YMZ's levels if you set the mixing approximately to that of a Gimmick! cart, however, the HFX4 clips the YMZ when you turn it up really high (just past "Gimmick! level"). I'm not sure if this is what you meant, but they do clip.
tadashibashi wrote:
Maybe someone can share me theirs to confirm.
I might have bumped the volume of the YMZ just a tad (for preference, it's still way under what it would sound like on an AV Famicom)
The knobs/chips:
YMZ - YMZ
SLOT4 - RP2C33
SLOT3 - VRC7
SLOT2 - N163 (varies according to channel needs)
SLOT1 - MMC5 (might be a little off since I'm using an NES cartridge for the expansion). Might change when I get a VRC6.
These are all mixed with the main "EXTERNAL VOLUME" pot perfectly centered.
ImATrackMan wrote:
The HFC5 clips a few of the YMZ's levels if you set the mixing approximately to that of a Gimmick! cart, however, the HFX4 clips the YMZ when you turn it up really high (just past "Gimmick! level"). I'm not sure if this is what you meant, but they do clip.
Everything clips if you turn it up loud enough, though. That's just a characteristic of anything connected to an amplifier.
Questions I need to answer:
1. Clipping of just the 5B, just the 2A03, or both together? (Can probably answer this by analyzing the circuit, visually.)
2. Is it hard or soft clipping, or more complicated than that? (Most likely close to ideal hard.)
3. What is the clipping threshold, and is it asymmetric?
Also, if you want a CopyNES that fits cleanly in a top loader, there's at least one option coming soon. Kevtris is making it part of his Hi-Def NES board:
http://forums.nesdev.com/viewtopic.php?f=9&t=12019By the way, would you mind replacing that image with a link? It's 4 MB large, and 5000 pixels wide.
rainwarrior wrote:
Questions I need to answer:
1. Clipping of just the 5B, just the 2A03, or both together? (Can probably answer this by analyzing the circuit, visually.)
2. Is it hard or soft clipping, or more complicated than that? (Most likely close to ideal hard.)
3. What is the clipping threshold, and is it asymmetric?
1. Just the 5B
2. Hard clipped
3. Do you want the dB level or the "$0x" volume level?
rainwarrior wrote:
By the way, would you mind replacing that image with a link? It's 4 MB large, and 5000 pixels wide.
Already done. I though the forum would resize it, so it surprised me quite a bit.
ImATrackMan wrote:
1. Just the 5B
2. Hard clipped
3. Do you want the dB level or the "$0x" volume level?
I don't understand how you are answering these questions. You don't have a 5B, do you?
rainwarrior wrote:
ImATrackMan wrote:
1. Just the 5B
2. Hard clipped
3. Do you want the dB level or the "$0x" volume level?
I don't understand how you are answering these questions. You don't have a 5B, do you?
Oh shoot, I though you were referring to the YMZ as "5B". I was answering with what happens with that. Carry on, then.
ImATrackMan wrote:
The knobs/chips:
YMZ - YMZ
SLOT4 - RP2C33
SLOT3 - VRC7
SLOT2 - N163 (varies according to channel needs)
SLOT1 - MMC5 (might be a little off since I'm using an NES cartridge for the expansion). Might change when I get a VRC6.
These are all mixed with the main "EXTERNAL VOLUME" pot perfectly centered.
Thanks for posting these ImATrackMan!
Settings:
My YMZ294 setting is at about 47 degrees counterclockwise from 3 o'clock
FDS is at about the same level as yours
VRC7 is a slightly higher than yours
VRC6 is about 3 degrees
MMC5 is about 5 degrees, which is significantly lower than yours
Mine are also mixed with both External Volume pot centered.
Problems I had:
-N163 seems to be a bit quirky since the NSF of King of Kings has that horrible noise that comes from using all 8 channels regardless of volume setting. The actual King of Kings' in-game music is fine of course, so it must be a problem with the TNS board. (I made a test NSF that had only one channel of music and it worked.) Note to self: test more as I use it to compose.
-Also I read a thread about FDS NSF's not working due to FDS storing musical data in a different way, and it's true of both Zelda and Metroid. So what I did to test the volume was use Rainwarrior's NSFImport which located the data just fine (thanks Rainwarrior!), export NSF and re-upload them to the TNS and it worked
The N163 always puts out that high frequency noise when enough channels are enabled. Because it's so high frequency, it's easy to filter out, though. Through RF out it's not very noticeable, though you said you're using an AV famicom? I don't know if that one has any kind of lowpass filter, but also your TV might have poor high frequency response, which would also reduce the noise. You hear it very clearly with the TNS thing because it's giving you a very clear, unmodified sound from the cartridge.
rainwarrior wrote:
The N163 always puts out that high frequency noise when enough channels are enabled. Because it's so high frequency, it's easy to filter out, though. Through RF out it's not very noticeable, though you said you're using an AV famicom? I don't know if that one has any kind of lowpass filter, but also your TV might have poor high frequency response, which would also reduce the noise. You hear it very clearly with the TNS thing because it's giving you a very clear, unmodified sound from the cartridge.
Oh wow, that makes a lot of sense. And yes, I am using an AV Famicom.
I actually fed the signal of the King of Kings in-game music directly through an Apogee Duet 2 interface (rather than a TV) and there was no noise. I'm wondering if there is some kind of LP filter that the cartridge activates during gameplay?
Edit: I just put a low-pass filter on the King of Kings TNS NSF playback, and it doesn't help. All that the N163 plays back is an extremely buzzy wave at about 55 Hz (it's a low A. This must be the lowest frequency?) I'm going to try to write an 8-channel NSF tomorrow and see what plays back.
tadashibashi wrote:
I just put a low-pass filter on the King of Kings TNS NSF playback, and it doesn't help. All that the N163 plays back is an extremely buzzy wave at about 55 Hz (it's a low A. This must be the lowest frequency?) I'm going to try to write an 8-channel NSF tomorrow and see what plays back.
Your problem seems worse than mine. I use a Youkai Dochuuki cart for my N163, and I get a similar nasty hum, however it goes away permanently upon playing any N163 NSF. There's a web page that has a list of mist of the Namco games and says whether there's noise or not. The "safe" carts are Rolling Thunder, Final Lap, and Kaijumonogatari
That ... kinda sounds like the memory inside the 163 is powering on with random values and it's interpreting those random values as data? Maybe?
I seem to recall that both the NSFs for the 8 channel N163 games King of Kings and Erika to Satoru no Yumebouken are broken. The problem seems subtle on emulators (e.g. muted channels) but it might be worse in a hardware situation?
ImATrackMan wrote:
Your problem seems worse than mine. I use a Youkai Dochuuki cart for my N163, and I get a similar nasty hum, however it goes away permanently upon playing any N163 NSF.
I don't think the cartridge is an issue concerning the low 55Hz A, because I made an 8-channel N163 NSF that works fine without that buzzy pitch.
Here's what I mean by 'buzzy'
King of Kings NSF - TNS (Buzzy) Sorry the volume's kind of loud b/c I think it normalized when I exported these. (Also it's not PCM but you can hear the frequencies fine.)
And here is the quick test NSF that I made using all 8 channels simultaneously
8CH N163 NSF TNSEdit: Hey, do you think you can make a recording of the NSF I attached? It's the same one that I recorded. I want to hear if there is a difference in cartridges. I have an AV Famicom, but I don't think that should make too big of a difference, right?
rainwarrior wrote:
I seem to recall that both the NSFs for the 8 channel N163 games King of Kings and Erika to Satoru no Yumebouken are broken. The problem seems subtle on emulators (e.g. muted channels) but it might be worse in a hardware situation?
I think you're probably right.
ImATrackMan wrote:
I might have bumped the volume of the YMZ just a tad (for preference, it's still way under what it would sound like on an AV Famicom)
Hey TrackMan, I think your settings on the YMZ294 is based on how FamiTracker and NSFPlay mixes SS-5B. I just wrote a piece for the 5B and noticed that the balance of the 5B used in Gimmick! is proportionally much higher than how Famitracker/NSFPlay mixes it. When I turned it down to about your mixing level in the image (bumped down a tad), it matched what Famitracker was outputting.
NSFPlay matches measurements I made from my own Gimmick cartridge. 2A03 output levels vary, and on top of that in-cart mixing varies from cart to cart, so it's not easy to get an authoritative "correct" mixing. We might be talking about a 10% resistor tolerance, but the variation is compounded at each stage of the mixing, so it can accumulate to much more than that.
Ah I see, so there really isn't a set standard
What is FT's mixing based off of?
Use the source, Luke! Here are relevant snippets from
Mixer.cpp:
Code:
/*
Mixing of internal audio relies on Blargg's findings
[Mixing levels of]
N163 & 5B are still unknown
*/
inline double CMixer::CalcPin1(double Val1, double Val2) {
if ((Val1 + Val2) > 0) {
return 95.88 / ((8128.0 / (Val1 + Val2)) + 100.0);
}
return 0;
}
inline double CMixer::CalcPin2(double Val1, double Val2, double Val3) {
if ((Val1 + Val2 + Val3) > 0) {
return 159.79 / ((1.0 / ((Val1 / 8227.0) + (Val2 / 12241.0)
+ (Val3 / 22638.0))) + 100.0);
}
return 0;
}
And from Mitsutaka Okazaki's
emu2149.c, the volume levels are thus:
Code:
{0x00, 0x01, 0x01, 0x02, 0x02, 0x03, 0x03, 0x04, 0x05, 0x06, 0x07, 0x09,
0x0B, 0x0D, 0x0F, 0x12,
0x16, 0x1A, 0x1F, 0x25, 0x2D, 0x35, 0x3F, 0x4C, 0x5A, 0x6A, 0x7F, 0x97,
0xB4, 0xD6, 0xFF, 0xFF}
That doesn't answer tadashibashi's question. The question is what the relative level of 5B to 2A03 in Famitracker is based on. This was some decision made by jsr, so you'd have to ask him (unless there is a comment about it in the source). You might try the
Famitracker Forums, as I don't know if he'll see this thread.
What you posted, tepples, is part of the nonlinear mix for each of those chips separately. The 2A03's is following Blarrg's nonlinearity formula (which is a rough approximation), and the 5B's is an 8-bit approximation of the log output of the YM2149, which is described in the
YM2149 datasheet. Neither of these describes the relative level of their output, or more importantly
why that relative level was chosen.
I based my 5B mixing on Rainwarrior's Gimmick! cart and bumped the volume a tad (maybe .4 dB) for preference, but besides that, all expansions are based on the NSFs vs. actual gameplay on games that I physically own. Every cartridge and FC has its own mixing variance. For example, any expansion game when used on an AV Famicom will have its expansion mixed much louder than on any RF Famicom.
ImATrackMan wrote:
I based my 5B mixing on Rainwarrior's Gimmick! cart and bumped the volume a tad (maybe .4 dB) for preference
Yeah I had to bring mine to the same level since I had been playing back my FTM in FT and NSF in NSFPlay. Both levels seem pretty similar.
Quote:
For example, any expansion game when used on an AV Famicom will have its expansion mixed much louder than on any RF Famicom.
Then wouldn't the pots of HFX4 on both AV and RF need to be about the same position (comparing our levels) to produce the levels of cartridge recordings produced by each respective system? Or is it b/c the TNS outputs audio on its own and doesn't come out of the Famicom? Or could it be that each TNS-HFC/HFX has its own variances in mixing levels? haha.. argh
tadashibashi wrote:
Or is it b/c the TNS outputs audio on its own and doesn't come out of the Famicom?
That one.
tadashibashi wrote:
Ah I see, so there really isn't a set standard
What is FT's mixing based off of?
The mixing in FT is based on rainwarrior's NSFplay at the moment since I haven't done my own measurements yet.
tadashibashi wrote:
Quote:
For example, any expansion game when used on an AV Famicom will have its expansion mixed much louder than on any RF Famicom.
Or is it b/c...
The situation is even worse that you might hope. Because each of the two channels coming from the 2A03 has its own resistor adding variance, not only does the overall 2A03 mix level vary between machines, but so does the mix between the squares channel and the tri/noise/dpcm channel.
rainwarrior wrote:
Because each of the two channels coming from the 2A03 has its own resistor adding variance [...] the mix between the squares channel and the tri/noise/dpcm channel [varies between machines]
But that should only be a decibel or so...
12kΩ×1.05 ÷ (12kΩ×1.05 + 20kΩ×0.95) ≈ .399
12kΩ×0.95 ÷ (12kΩ×0.95 + 20kΩ×1.05) ≈ .352
.399 ÷ .352 ≈ 1.13 ; 20×log₁₀(1.13) ≈ 1.09dB
Which ... I guess, given that ImATrackMan mentioned fiddling with a volume adjustment of 0.4dB, I guess that's comparatively huge.
But that's "absolute highest possible error" to "absolute lowest possible error"; in practice 5% carbon-film resistors like those used in the NES have the correct value within a gaussian distribution with 3σ ≈ ±5%.
(Unlike 10% or worse resistors, 5% resistors are approximately "as good as it gets" for the technology, so it actually is gaussian (q.v.) while it's moderately-well-accepted that lower-precision resistors have the sweet spot cut out in the middle from a measure-and-bin stage.
Sorry to sway the conversation, but I just used a breadboard to connect Gimmick! to the YMZ294 port and my set up didn't work. I put D0-D7 in the right places, the Gimmick Audio to RF (pin46) to YMZ Sound Out (pin5), Gimmick M2 to YMZ Master Clock (pin7), the ROMSEL to CS and WR to R/W. I also put the 5v to 5v but removed it when nothing changed. There was a loud hum with static happening in rhythm so it seems like the data from D0-D7 was doing something? But I just gave up since have no clue what else I could do. Would the A0-A14 pins need something inputted to them? As a side note, my cartridge connector is stuck inside my Gimmick cartridge : P
Yeah, you need to tie Gimmick's CPU A14 (pin 35) input high and connect Gimmick CPU A13 (pin 34) to YMZ294 A0.
You "should" tie the other input pins high or low, but that might not be necessary.
lidnariq wrote:
Yeah, you need to tie Gimmick's CPU A14 (pin 35) input high and connect Gimmick CPU A13 (pin 34) to YMZ294 A0.
You "should" tie the other input pins high or low, but that might not be necessary.
Sorry, what does 'high' and 'low' mean?
Edit: and 'tie'? Just want to make sure I understand accurately.
tadashibashi wrote:
what does 'high' and 'low' mean?
Connecting them to the 5V power source, or 0V ground reference.
lidnariq wrote:
rainwarrior wrote:
...the mix between the squares channel and the tri/noise/dpcm channel [varies between machines]...
But that should only be a decibel or so...
"Should", but I think the sampling I measured a while back was a bit worse than that. I seem to recall measured varation more like up to ~25%? I can't find the spreadsheets I made, but I was planning to re-test and re-measure this stuff next time I do a pass at NSFPlay anyway, so I'll report back whenever that happens.
"tie" means connect. (Usually more permanently)
Measured variation of 25% (if relative to each other) is still "only" 2dB. And the 100Ω pulldowns on the audio pins make it impossible to accurately measure the two mixing resistors anyway; I basically always end up measuring (12kΩ in parallel with 20kΩ) = 7.5kΩ
lidnariq wrote:
Well, ok, as a final guess, I'd hope something like the following is true of the YMZ294 socket:
pin 1 = /WR = connected to ground or to R/W (cartridge pin 14)
pin 2 = /CS = connected to /ROMSEL
pin 3 = A0 = hopefully connected to CPU A13 (cartridge pin 34)
pin 4 = Vdd
pin 5 = SoundOut - probably not connected at all
pin 6 = Gnd
pin 7 = φM = connected to M2 (cartridge pin 32)
pin 8 = 4/6 = pulled to ground through a resistor somewhere
pin 9 = /IC = pulled high through a resistor, unless there's explicit reset circuitry somewhere
IF all the above are true, then I'm not clear why just plugging Gimmick! in isn't working.
Hmm, I did everything here and it reproduced what it would sound like in a normal cartridge slot, meaning I was able to get the loud noise from Gimmick's noise generator.. I wonder if TNS-HFX4 just doesn't support Gimmick! at all.
(Except I don't know if I understand what pins 8 and 9 are supposed to go)
tadashibashi wrote:
I was able to get the loud noise from Gimmick's noise generator...
Would you try explaining that again? I'm not certain I understand.
Gimmick, when placed in one of the HFX4 expansion cartridge slots produces either:
-Nothing
-intervallic popping (more rare)
-constant noise from the 5B's random noise generator
-crescendoing noise from the 5B's random noise generator that when it reaches max volume stops and is silent until Famicom is turned off and back on and the crescendoing noise happens again.
These sounds happen regardless even before an NSF has been played.
When I followed the connections you posted from Gimmick to the YMZ294 port, it produced the crescendoing noise. So I believe it worked in that sense but it is not able to produce square waves, let alone follow instructions from NSF's.
Quick question: does the 5B require an IRQ signal? When I tried finding the pinout of the HFX4's 40-pin connector a couple of weeks ago to eventually try something out (Pay no attention to the (EXP) markers) I saw pin 25 connected to the IRQ line. Pin 25 is labelled as "No Connection" because it's physically missing a pin on the HFE1, but looking at it on both ends (the HFE1 riser card and the HFX itself) it's got traces running to FC pin 15 on every cart slot (/IRQ). Would connecting it fix some or all 5B issues?
In other news, I figured out how to get the TNS to get sound output via RF/RCA. Connect pin 28 to the headphone jack on the HFX, and on the HFE1, connect pin 28 to the 4th (unpopulated) jumper pin. BONUS: You can add that 4th jumper pin, and use the HFE1 as a fully functional FC cart slot by connecting the 3rd and 4th header pins.
Code:
Riser card IDE connector
(Looking into connector from top)
-----
M2 -- |01 02| -- GND
CPU A12 -- |03 04| -- CPU A11
CPU A13 -- |05 06| -- CPU A10
CPU A14 -- |07 08| -- CPU A9
CPU A7 -- |09 10| -- CPU A8
CPU A5 -- |11 12| -- CPU A6
CPU A3 -- |13 14| -- CPU A4
CPU A1 -- |15 16| -- CPU A2
CPU A0 -- |17 18| -- /ROMSEL (A15 + /M2)
FG -- |19 20| -- FG
2A03 (EXP) -- |21 22| -- FG
CPU R/W -- |23 24| -- FG
(NC) |25 26| -- FG
+5V -- |27 28| (NC)
+5V -- |29 30| -- FG
(EXP) CPU D7 - |31 32| -- CPU D6 (EXP)
(EXP) CPU D5 - |33 34| -- FG
(EXP) CPU D4 - |35 36| -- CPU D3 (EXP)
(EXP) CPU D2 - |37 38| -- CPU D1 (EXP)
(EXP) CPU D0 - |39 40| -- FG
-----
ImATrackMan wrote:
Quick question: does the 5B require an IRQ signal?
Doubtful: the /IRQ signal is an output from the mapper, and the YMZ294 doesn't have one at all.
I just discovered that the Gimmick! cart plays that same noise (when in an HFX4 cartridge slot) when the cartridge is not inserted correctly in my AV Famicom upon turning it on. Maybe it needs some kind of correct data input keeps this noise from happening?
That sound is the "sound generation control is powering on with random values" ... all it indicates is that nothing's ever being written to it.
lidnariq wrote:
That sound is the "sound generation control is powering on with random values" ... all it indicates is that nothing's ever being written to it.
I see that makes a lot of sense, thanks!
Sorry if I'm beating a dead horse, but I was thinking for a solution, could it possibly work to connect the Gimmick cart to an HFX4 cartridge slot, and then send YMZ's A0 to Gimmick's CPU A14?
tadashibashi wrote:
could it possibly work to connect the Gimmick cart to an HFX4 cartridge slot, and then send YMZ's A0 to Gimmick's CPU A14?
CPU A13; Gimmick's sound registers are at $C000 and $E000.
That said, isn't that what you did? Or am I confused? (I have to admit, if it IS what you did, I'm completely bewildered why it's not working)
The problem may be bus conflicts from the 5B cartridge preventing the TNS-HFC software from executing properly, rather than any kind of problem getting the audio control signals to the 5B cartridge.
Oh, sure. Try tying the cart R/W input (pin 14) to ground, instead of to R/W. (Absolute worst it'll produce garbage writes to the sound registers instead, but that'll at least sorta work)
Okay wait, I'm a little confused, so I was connecting the YMZ slot directly to the Gimmick cart, but you intended directions for the Gimmick cart to go into the HFX4 catridge slot (w/ ymz connected to corresponding Gimmick pins)?
I know this is a noob question but what's an example of tying pin 14 to ground? I'm not sure what ground is, other than absorbing current.
tadashibashi wrote:
Okay wait, I'm a little confused, so I was connecting the YMZ slot directly to the Gimmick cart, but you intended directions for the Gimmick cart to go into the HFX4 catridge slot (w/ ymz connected to corresponding Gimmick pins)?
No, I intended the former, connecting the YMZ slot directly to Gimmick!, as I thought you did.
Quote:
I know this is a noob question but what's an example of tying pin 14 to ground? I'm not sure what ground is, other than absorbing current.
Ground is ... another signal. Um. In this case, I'm using it to mean "always 0".
You said you connected the data bus also to the external slot, right? i.e. on the YMZ294 pads, you connected pins 10-18 also, yes? So of the 18 pins on the YMZ294 connector, you had a total of 16 wires going from the connector to Gimmick! ?
This reminds me of my failed attempt at wiring an AY-3-8910 to the socket to get the 5B an octave higher. Then I realized you could just connect the clock pin to Lagrange Point's ceramic resonator.
EDIT: was just clicking around on the TNS site and found a chart saying that they moved the original 5B address from $C000 to $5FE0 to avoid conflicting with the VRC7 when used at the same time.
Reviving this with something hopefully useful, I got myself an HFC4 which means I can record directly from a real Gimmick! cartridge, and since the last post in this topic, I've also gotten my own copy of Gimmick!.
This has lead to me finding that there's something odd with how Famitracker handles the 5B. When using the YM on the HFX4, (almost) every 5B NSF plays perfectly fine, but when using Gimmick!, the envgen no longer behaves as expected.
The reason I say "almost" is that with the FT 0.5 BETA, Noise and Tone work perfectly fine, but Envelope and anything combined with it either remains silent or plays one of the "oneshot" shapes ($00-$03/$09), the exception to this is when it's combined with a TN that's playing extremely high, nearly-inaudible-to-inaudible periods, effectively halving the ENV volume. This issue happens on both a real 5B and the HFX4 YM. With 0CC-FT, however, the ENV seems to be disabled, so either total silence is "played" or the NS/TN it's combined with plays at full volume (since there's no ENV). Everything else works as normal, but this only happens on the 5B, the YMZ plays all sounds as expected.
The real kicker is that it's not an issue with the TNS hardware or Gimmick!. NSFs generated via MML, with OFGS, NSD.lib, or MCK, play absolutely perfectly on both chips. The TNS sends the right data to the right place, so it's probably somehow FT's fault. Sadly, I'm not programming-oriented at all, so I can't possibly figure out what it is.
Forgive me if this sounds stupid, it's 6-ish AM and I haven't slept in nearly a day and a half.
EDIT: So, Famitracker BETA only needs to have the channel enabled via an instrument macro, it can't be blank or zero-volume, otherwise the envelope won't play. 0CC famitracker still has its odd issue.